code: def clean_field_dict(field_dict, cleaner=str.strip, time_zone=None):
      r
      d = {}
      if time_zone is None:
          tz = DEFAULT_TZ
      for k, v in viewitems(field_dict):
          if k == '_state':
              continue
          if isinstance(v, basestring):
              d[k] = cleaner(str(v))
          elif isinstance(v, (datetime.datetime, datetime.date)):
              d[k] = tz.localize(v)
          else:
              d[k] = v
      return d
docs: r"""Normalize field values by stripping whitespace from strings, localizing datetimes to a timezone, etc
  
      >>> (sorted(clean_field_dict({'_state': object(), 'x': 1, 'y': "\t  Wash Me! \n" }).items()) ==
      ... [('x', 1), ('y', 'Wash Me!')])
      True