@classmethod
    def factory(cls, data):
        try:
            cm = CLASS_MAP[cls.__name__]
            for key in data:
                if key in cm and isinstance(data[key], list):
                    l = []
                    for d in data[key]:
                        l.append(JsonObjectFactory.create(cm[key], d))
                    data[key] = l
                elif key in cm:
                    data[key] = JsonObjectFactory.create(cm[key], data[key])
        except __HOLE__:
            pass

        return cls(**data)
dataset/ETHPy150Open dave-tucker/hp-sdn-client/hpsdnclient/datatypes.py/JsonObject.factory