def get_evidences_by_pmid(graph: BELGraph, pmids: Union[str, Iterable[str]]):
result = defaultdict(set)<EOL>for _, _, _, data in filter_edges(graph, build_pmid_inclusion_filter(pmids)):<EOL><INDENT>result[data[CITATION][CITATION_REFERENCE]].add(data[EVIDENCE])<EOL><DEDENT>return dict(result)<EOL>
Get a dictionary from the given PubMed identifiers to the sets of all evidence strings associated with each
    in the graph.

    :param graph: A BEL graph
    :param pmids: An iterable of PubMed identifiers, as strings. Is consumed and converted to a set.
    :return: A dictionary of {pmid: set of all evidence strings}
    :rtype: dict