docs: def build_relation_predicate(relations: Strings) -> EdgePredicate:
      """Build an edge predicate that passes for edges with the given relation."""
      if isinstance(relations, str):
          @edge_predicate
          def relation_predicate(edge_data: EdgeData) -> bool:
              """Pass for relations matching the enclosed value."""
              return edge_data[RELATION] == relations
  
      elif isinstance(relations, Iterable):
          relation_set = set(relations)
  
          @edge_predicate
          def relation_predicate(edge_data: EdgeData) -> bool:
              """Pass for relations matching the enclosed values."""
              return edge_data[RELATION] in relation_set
  
      else:
          raise TypeError
  
      return relation_predicate