def _convert_datetime_str(response):
 if response:
  return dict([((k, '{0}'.format(v)) if isinstance(v, datetime.date) else (k, v)) for (k, v) in six.iteritems(response)])
 return None

def _convert_datetime_str ( response ) : if response : return dict ( [ ( ( k , '{0}' . format ( v ) ) if isinstance ( v , datetime . date ) else ( k , v ) ) for ( k , v ) in six . iteritems ( response ) ] ) return None
modify any key-value pair where value is a datetime object to a string .