<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_suggested_type_names(schema, output_type, field_name):
 """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 isinstance(output_type, (GraphQLInterfaceType, GraphQLUnionType)):
        suggested_object_types = []
        interface_usage_count = OrderedDict()
        for possible_type in schema.get_possible_types(output_type):
            if not possible_type.fields.get(field_name):
                return

            # This object type defines this field.
            suggested_object_types.append(possible_type.name)

            for possible_interface in possible_type.interfaces:
                if not possible_interface.fields.get(field_name):
                    continue

                # This interface type defines this field.
                interface_usage_count[possible_interface.name] = (
                    interface_usage_count.get(possible_interface.name, 0) + 1
                )

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

        # Suggest both interface and object types.
        suggested_interface_types.extend(suggested_object_types)
        return suggested_interface_types

    # Otherwise, must be an Object type, which does not have possible fields.
    return []