<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _node_has_modifier(graph: BELGraph, node: BaseEntity, modifier: str) -> bool: """Return true if over any of a nodes edges, it has a given modifier. Modifier can be one of: - :data:`pybel.constants.ACTIVITY`, - :data:`pybel.constants.DEGRADATION` - :data:`pybel.constants.TRANSLOCATION`. :param modifier: One of :data:`pybel.constants.ACTIVITY`, :data:`pybel.constants.DEGRADATION`, or :data:`pybel.constants.TRANSLOCATION` """

    modifier_in_subject = any(
        part_has_modifier(d, SUBJECT, modifier)
        for _, _, d in graph.out_edges(node, data=True)
    )

    modifier_in_object = any(
        part_has_modifier(d, OBJECT, modifier)
        for _, _, d in graph.in_edges(node, data=True)
    )

    return modifier_in_subject or modifier_in_object