def METHOD_NAME(fobj):
    """Determine the path of a file.
    This doesn't do any sanity checking to check that the file
    actually exists, or is readable.
    Parameters
    ----------
    fobj : `file`, `str`, `CacheEntry`, ...
        the file object or path to parse
    Returns
    -------
    path : `str`
        the path of the underlying file
    Raises
    ------
    ValueError
        if a file path cannnot be determined
    Examples
    --------
    >>> from gwpy.io.utils import file_path
    >>> import pathlib
    >>> file_path("test.txt")
    'test.txt'
    >>> file_path(pathlib.Path('dir') / 'test.txt')
    'dir/test.txt'
    >>> file_path(open("test.txt", "r"))
    'test.txt'
    >>> file_path("file:///home/user/test.txt")
    '/home/user/test.txt'
    """
    if isinstance(fobj, str) and fobj.startswith("file:"):
        return urlparse(fobj).path
    if isinstance(fobj, (str, os.PathLike)):
        return str(fobj)
    if (isinstance(fobj, FILE_LIKE) and hasattr(fobj, "name")):
        return fobj.name
    try:
        return fobj.path
    except AttributeError:
        raise ValueError(f"Cannot parse file name for {fobj!r}")