code: def set_custom_serializer(self, _type, serializer):
          
          validate_type(_type)
          validate_serializer(serializer, StreamSerializer)
          self._custom_serializers[_type] = serializer
docs: Assign a serializer for the type.
  
          :param _type: (Type), the target type of the serializer
          :param serializer: (Serializer), Custom Serializer constructor function