def createSubsetGafDict(subset, gafDict):
    """
    Generates a dictionary that maps the subset's Uniprot ACs to the GO IDs,
    based on the provided gene subset and the gaf dictionary.

    Parameters
    ----------
    subset : set of str
        A subset of Uniprot ACs of interest.
    gafDict : dict of str mapping to set
        A dictionary that maps Uniprot ACs (str) to a set GO IDs.
        Generated by importGAF().

    Returns
    -------
    dict of str mapping to set
        A dictionary that maps the subset's Uniprot ACs to GO IDs.
    """

    gafSubsetDict = {gene: gafDict[gene] for gene in subset if gene in gafDict}

    return gafSubsetDict