def register(self, name, ref):
        """ register an actor ref with a name in the registry """
        with self._lock:

            if name in self._registered_names:
                if self._registered_names[name] == ref:
                    return
                raise KeyError("An actor is already registered for this name")

            self._registered_names[name] = ref
            if not self._by_ref in ref:
                self._by_ref[ref] = [name]
            else:
                self._by_ref[ref].append(name)
dataset/ETHPy150Open benoitc/flower/flower/registry.py/Registry.register/swapped operands of `in`