@classmethod
    def factory(cls, data):
        try:
            cm = CLASS_MAP[cls.__name__]
            for key in data:
                if key == 'match':
                    new_match = {}
                    for d in data[key]:
                        for k in d:
                            new_match[k] = d[k]
                    data[key] = JsonObjectFactory.create('Match', new_match)
                elif key == 'actions':
                    new_action = {}
                    keys = []
                    for d in data[key]:
                        keys.extend([(k, v) for k, v in d.items()])
                    num_keys = range(len(keys))

                    duplicates = {}

                    for i in num_keys:
                        key_name = keys[i][0]
                        if key_name in duplicates:
                            duplicates[key_name].append(i)
                        else:
                            duplicates[key_name] = [i]

                    for k, v in duplicates.items():
                        if len(v) > 1:
                            new_action[k] = [keys[i][1] for i in v]
                        else:
                            new_action[k] = keys[i][1]

                    data[key] = JsonObjectFactory.create('Action', new_action)
                elif 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 KeyError:
            pass
        return cls(**data)
Returns the name of the worker, under which it is registered to the
dataset/ETHPy150Open dave-tucker/hp-sdn-client/hpsdnclient/datatypes.py/Flow.factory--crossover with--dataset/ETHPy150Open bretth/django-pq/pq/worker.py/Worker.calculated_name