code: def serialize(self, value, **kwargs):
          
          kwargs.update({'include_class': kwargs.get('include_class', True)})
          if self.serializer is not None:
              return self.serializer(value, **kwargs)
          if value is None:
              return None
          serial_tuples = [
              (
                  self.key_prop.serialize(key, **kwargs),
                  self.value_prop.serialize(val, **kwargs)
              )
              for key, val in iteritems(value)
          ]
          try:
              serial_dict = {key: val for key, val in serial_tuples}
          except TypeError as err:
              raise TypeError('Dictionary property {} cannot be serialized - '
                              'keys contain {}'.format(self.name, err))
          return serial_dict
docs: Return a serialized copy of the dict