code: def to_obj(cls, obj_data=None, *fields, **field_map):
      ''' prioritize obj_dict when there are conficts '''
      obj_dict = obj_data.__dict__ if hasattr(obj_data, '__dict__') else obj_data
      if not fields:
          fields = obj_dict.keys()
      obj = cls()
      update_obj(obj_dict, obj, *fields, **field_map)
      return obf to_obj(cls, obj_data=None, *fields, **field_map):
      ''' prioritize obj_dict when there are conficts '''
      obj_dict = obj_data.__dict__ if hasattr(obj_data, '__dict__') else obj_data
      if not fields:
          fields = obj_dict.keys()
      obj = cls()
      update_obj(obj_dict, obj, *fields, **field_map)
      return obj
docs: prioritize obj_dict when there are conficts