def _serializer(obj):
 import datetime
 if isinstance(obj, datetime.datetime):
  if (obj.utcoffset() is not None):
   obj = (obj - obj.utcoffset())
  return obj.__str__()
 return obj

def _serializer ( obj ) : import datetime if isinstance ( obj , datetime . datetime ) : if ( obj . utcoffset ( ) is not None ) : obj = ( obj - obj . utcoffset ( ) ) return obj . __str__ ( ) return obj
helper function to serialize some objects for prettier return .