code: def _get_referenced_type_equivalences(graphql_types, type_equivalence_hints):
      
      referenced_types = set()
      for graphql_type in graphql_types.values():
          if isinstance(graphql_type, (GraphQLObjectType, GraphQLInterfaceType)):
              for _, field in graphql_type.fields.items():
                  if isinstance(field.type, GraphQLList):
                      referenced_types.add(field.type.of_type.name)
      return {
          original: union
          for original, union in type_equivalence_hints.items()
          if union.name in referenced_types
      }
docs: Filter union types with no edges from the type equivalence hints dict.