def METHOD_NAME(filepath):
    """
    Returns a list of version number for a file path.
    """
    filedir = os.path.dirname(filepath)
    filename = os.path.basename(filepath)
    if not os.path.isdir(filedir):
        raise HTTPError(500, "Unable to list content from directory: %s"
                             % (filedir))
    if not os.path.isfile(filepath):
        raise HTTPError(404, "File %s does not exist." % (filepath))
    versions = []
    l_filename = len(filename)
    for f in listdir(filedir):
        try:
            if f[:l_filename] == filename \
               and check_version_format(f[l_filename + 1:]):
                """
                Let's consider f as one of the  previous version of the file
                if the first part of f's name is equal to original file name
                and the rest of f's name (-1 for the seperating dot) is a
                valid version number.
                """
                versions.append(f[l_filename + 1:])
        except Exception:
            pass
    # Return a sorted versions list.
    return sorted(versions, reverse=True)