def add_target_role(self, o):
        self.roles.add(o)
        self.role_by_name[o.name()] = o
        for k, v in o.__dict__.iteritems():
            if k.startswith("handle_") and callable(v):
                handler_for = k.split("_", 1)[-1]
                assert handler_for in self.classes, "protobuf class not recognized; register() the module"
                self.role_messages[o].append(handler_for)
dataset/ETHPy150Open dieseldev/diesel/diesel/convoy/__init__.py/Convoy.add_target_role/original