code: def deserialize(cls, v):
          
          if v is None:
              return None
          if cls == Gear and v.get('resource_state') == 3:
              if 'frame_type' in v:
                  o = Bike()
              else:
                  o = Shoe()
          else:
              o = cls()
          o.from_dict(v)
          return o
docs: Creates a new object based on serialized (dict) struct.