nodes: 0, module; 1, function_definition; 2, function_name:sort_qualified_edges; 3, parameters; 4, type; 5, block; 6, identifier:graph; 7, generic_type; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, identifier:Iterable; 12, type_parameter; 13, comment:"""Return the qualified edges, sorted first by citation, then by evidence, then by annotations.
  
      :param BELGraph graph: A BEL graph
      """; 14, assignment; 15, call; 16, type; 17, identifier:qualified_edges; 18, generator_expression; 19, identifier:sorted; 20, argument_list; 21, identifier:EdgeTuple; 22, tuple; 23, for_in_clause; 24, if_clause; 25, identifier:qualified_edges; 26, keyword_argument; 27, identifier:u; 28, identifier:v; 29, identifier:k; 30, identifier:d; 31, pattern_list; 32, call; 33, boolean_operator; 34, identifier:key; 35, identifier:_sort_qualified_edges_helper; 36, identifier:u; 37, identifier:v; 38, identifier:k; 39, identifier:d; 40, attribute; 41, argument_list; 42, call; 43, call; 44, identifier:graph; 45, identifier:edges; 46, keyword_argument; 47, keyword_argument; 48, attribute; 49, argument_list; 50, attribute; 51, argument_list; 52, identifier:keys; 53, True; 54, identifier:data; 55, True; 56, identifier:graph; 57, identifier:has_edge_citation; 58, identifier:u; 59, identifier:v; 60, identifier:k; 61, identifier:graph; 62, identifier:has_edge_evidence; 63, identifier:u; 64, identifier:v; 65, identifier:k
code: def sort_qualified_edges(graph) -> Iterable[EdgeTuple]:
      """Return the qualified edges, sorted first by citation, then by evidence, then by annotations.
  
      :param BELGraph graph: A BEL graph
      """
      qualified_edges = (
          (u, v, k, d)
          for u, v, k, d in graph.edges(keys=True, data=True)
          if graph.has_edge_citation(u, v, k) and graph.has_edge_evidence(u, v, k)
      )
      return sorted(qualified_edges, key=_sort_qualified_edges_helper)