import pathlib


def get_path_from_file(file_path):
    """ From a givem file_path, returns the folder path

    eg. file_path = 'path/to/file.txt', returns 'path/to/'
    """
    path = pathlib.Path(file_path)
    return str(path.parents[0])