<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_subgraphs_by_annotation(graph, annotation, sentinel=None):
 """Stratify the given graph into sub-graphs based on the values for edges' annotations. :param pybel.BELGraph graph: A BEL graph :param str annotation: The annotation to group by :param Optional[str] sentinel: The value to stick unannotated edges into. If none, does not keep undefined. :rtype: dict[str,pybel.BELGraph] """

    if sentinel is not None:
        subgraphs = _get_subgraphs_by_annotation_keep_undefined(graph, annotation, sentinel)
    else:
        subgraphs = _get_subgraphs_by_annotation_disregard_undefined(graph, annotation)

    cleanup(graph, subgraphs)

    return subgraphs