def get_path(name="log", abspath=None, relative_path=None, _file=None, parent=False):
    """Create path if path don't exist
    Args:
        name: folder name
        abspath: absolute path to be prefix
        relative_path: relative path that can be convert into absolute path
        _file: use directory based on _file
        parent: whether the path is in the parent folder
    Returns: Path of the folder
    """
    import os

    if abspath:
        directory = os.path.abspath(os.path.join(abspath, name))
    elif relative_path:
        directory = os.path.abspath(os.path.join(os.path.abspath(relative_path), name))
    else:
        import sys

        if getattr(sys, "frozen", False):
            application_path = os.path.dirname(sys.executable)
            directory = os.path.abspath(os.path.join(application_path, name))
        elif _file:
            if parent:
                directory = os.path.abspath(
                    os.path.join(os.path.dirname(_file), *([os.pardir] * parent), name)
                )
            else:
                directory = os.path.abspath(os.path.join(os.path.dirname(_file), name))
        else:
            if parent:
                directory = os.path.abspath(
                    os.path.join(
                        os.path.dirname(__file__), *([os.pardir] * parent), name
                    )
                )
            else:
                directory = os.path.abspath(
                    os.path.join(os.path.dirname(__file__), name)
                )
    if not os.path.exists(directory):
        os.makedirs(directory)
    return directory
