code: def fromDict(cls, data):
          
          obj = cls()
          obj.raw = data
          for name, value in data.iteritems():
              if cls.SIMPLE_PROPS and name in cls.SIMPLE_PROPS:
                  setattr(obj, name, value)
              elif cls.COMPLEX_PROPS and name in cls.COMPLEX_PROPS:
                  value = cls.COMPLEX_PROPS[name].fromDict(value)
                  setattr(obj, name, value)
              elif cls.LIST_PROPS and name in cls.LIST_PROPS:
                  value = [cls.LIST_PROPS[name].fromDict(item)
                           for item in value]
                  setattr(obj, name, value)
  
          return obj
docs: Fill this objects attributes from a dict for known properties.