def unregister(self, ref_or_name):
        """ unregister a name in the registery. If the name doesn't
        exist we safely ignore it. """
        try:
            if isinstance(ref_or_name, six.string_types):
                with self._lock:
                    ref = self._registered_names[ref_or_name]
                    names = self._by_ref[ref]
                    del names[operator.indexOf(names, ref_or_name)]
                    del self._registered_names[ref_or_name]
            else:
                with self._lock:
                    names = self._by_ref[ref_or_name]
                    for name in names:
                        del self._registered_names[name]
        except (__HOLE__, IndexError):
            pass
dataset/ETHPy150Open benoitc/flower/flower/registry.py/Registry.unregister