def get_suggested_type_names(
    schema: GraphQLSchema, type_: GraphQLOutputType, field_name: str
) -> List[str]:
    """
    Get a list of suggested type names.

    Go through all of the implementations of type, as well as the interfaces
    that they implement. If any of those types include the provided field,
    suggest them, sorted by how often the type is referenced, starting with
    Interfaces.
    """
    if is_abstract_type(type_):
        type_ = cast(GraphQLAbstractType, type_)
        suggested_object_types = []
        interface_usage_count: Dict[str, int] = defaultdict(int)
        for possible_type in schema.get_possible_types(type_):
            if field_name not in possible_type.fields:
                continue
            # This object type defines this field.
            suggested_object_types.append(possible_type.name)
            for possible_interface in possible_type.interfaces:
                if field_name not in possible_interface.fields:
                    continue
                # This interface type defines this field.
                interface_usage_count[possible_interface.name] += 1

        # Suggest interface types based on how common they are.
        suggested_interface_types = sorted(
            interface_usage_count, key=lambda k: -interface_usage_count[k]
        )

        # Suggest both interface and object types.
        return suggested_interface_types + suggested_object_types

    # Otherwise, must be an Object type, which does not have possible fields.
    return []
Get a list of suggested type names.

    Go through all of the implementations of type, as well as the interfaces
    that they implement. If any of those types include the provided field,
    suggest them, sorted by how often the type is referenced, starting with
    Interfaces.