code: def _serialize_datetime(value):
      
      if not isinstance(value, (datetime, arrow.Arrow)):
          raise ValueError(u'The received object was not a datetime: '
                           u'{} {}'.format(type(value), value))
      return value.isoformat()
docs: Serialize a DateTime object to its proper ISO-8601 representation.