code: def deserialize_instance(model, data={}):
      "Translate raw data into a model instance."
      ret = model()
      for k, v in data.items():
          if v is not None:
              try:
                  f = model._meta.get_field(k)
                  if isinstance(f, DateTimeField):
                      v = dateparse.parse_datetime(v)
                  elif isinstance(f, TimeField):
                      v = dateparse.parse_time(v)
                  elif isinstance(f, DateField):
                      v = dateparse.parse_date(v)
              except FieldDoesNotExist:
                  pass
          setattr(ret, k, v)
      return ref deserialize_instance(model, data={}):
      "Translate raw data into a model instance."
      ret = model()
      for k, v in data.items():
          if v is not None:
              try:
                  f = model._meta.get_field(k)
                  if isinstance(f, DateTimeField):
                      v = dateparse.parse_datetime(v)
                  elif isinstance(f, TimeField):
                      v = dateparse.parse_time(v)
                  elif isinstance(f, DateField):
                      v = dateparse.parse_date(v)
              except FieldDoesNotExist:
                  pass
          setattr(ret, k, v)
      return ret
docs: Translate raw data into a model instance.