def METHOD_NAME(file_name: str) -> Tuple[str, str, str]:
    file_name = file_name.lower()
    if file_name.endswith(".whl"):
        pwf = parse_wheel_filename(file_name)
        return pwf.project, pwf.version, ".whl"
    for suffix in [".zip", ".tar.gz"]:
        if file_name.endswith(suffix):
            file_name = file_name[: -len(suffix)]
            break
    else:
        raise AssertionError("Unexpected file name " + file_name)
    # dist name and version is separated by the dash, but both parts can also contain dashes...
    if file_name.count("-") == 1:
        dist_name, version = file_name.split("-")
    else:
        # assuming dashes in the version part have digit on their left and letter on their right
        # let's get rid of these
        tweaked_file_name = re.sub(r"(\d)-([a-zA-Z])", r"\1_\2", file_name)
        # now let's treat the rightmost dash as separator
        dist_name = tweaked_file_name.rsplit("-", maxsplit=1)[0]
        version = file_name[len(dist_name) + 1 :]
    return dist_name, version, suffix