docs: def _edge_both_nodes(nodes: List[Node]):
          """Get edges where both the source and target are in the list of nodes."""
          node_ids = [node.id for node in nodes]
  
          return and_(
              Edge.source_id.in_(node_ids),
              Edge.target_id.in_(node_ids),
          )