def has_gendered_pronouns(doc):
    """
    Doc-level spaCy attribute getter, which returns True if
    there are any pronouns (tag_ "PRP" or "PRP$") in the Doc
    with a "m" or "f" gender.
    """
    pronoun_genders = [token._.gender for token in doc if token.tag_ in ["PRP", "PRP$"]]
    has_gendered_pronoun = any([g in ["m", "f"] for g in pronoun_genders])
    return has_gendered_pronoun