@classmethod
def get_polymorphic_serializer_for_type(cls, obj_type):
    """
        Return the polymorphic serializer associated with the given type.
        Raise `NotImplementedError` if no serializer is found for the given type. This usually
        means that a serializer is missing in the class's `polymorphic_serializers` attribute.
        """
    try:
        return cls._poly_type_serializer_map[obj_type]
    except KeyError:
        raise NotImplementedError(
            'No polymorphic serializer has been found for type {}'.format(
            obj_type))
