import zipfile


def extract_file_from_zip(
    zip_file: zipfile.ZipFile,
    internal_file_path: str,
    dest: str,
) -> str:
    """
    Extract file from ZIP and copy it to a directory.

    :param zip_file: the ZipFile object
    :param internal_file_path: the internal path (inside the ZIP) of the file to extract
    :param dest: the directory to copy the file into
    :return: the path of the extracted file
    """
    return zip_file.extract(internal_file_path, path=dest)