docstr: Parameters
  ----------
  name : str
      Name of the optimizer.
  obj
      The optimizer to register.
  tags
      Tag name that allow to select the optimizer.
  kwargs
      If non empty, should contain only use_db_name_as_tag=False.
      By default, all optimizations registered in EquilibriumDB
      are selected when the EquilibriumDB name is used as a
      tag. We do not want this behavior for some optimizer like
      local_remove_all_assert. use_db_name_as_tag=False remove
      that behavior. This mean only the optimizer name and the
      tags specified will enable that optimization.
code: def register(self, name, obj, *tags, **kwargs):
      """
  
      Parameters
      ----------
      name : str
          Name of the optimizer.
      obj
          The optimizer to register.
      tags
          Tag name that allow to select the optimizer.
      kwargs
          If non empty, should contain only use_db_name_as_tag=False.
          By default, all optimizations registered in EquilibriumDB
          are selected when the EquilibriumDB name is used as a
          tag. We do not want this behavior for some optimizer like
          local_remove_all_assert. use_db_name_as_tag=False remove
          that behavior. This mean only the optimizer name and the
          tags specified will enable that optimization.
  
      """
      # N.B. obj is not an instance of class Optimizer.
      # It is an instance of a DB.In the tests for example,
      # this is not always the case.
      if not isinstance(obj, (DB, opt.Optimizer, opt.LocalOptimizer)):
          raise TypeError("Object cannot be registered in OptDB", obj)
      if name in self.__db__:
          raise ValueError(
              "The name of the object cannot be an existing"
              " tag or the name of another existing object.",
              obj,
              name,
          )
      if kwargs:
          assert "use_db_name_as_tag" in kwargs
          assert kwargs["use_db_name_as_tag"] is False
      else:
          if self.name is not None:
              tags = tags + (self.name,)
      obj.name = name
      # This restriction is there because in many place we suppose that
      # something in the DB is there only once.
      if obj.name in self.__db__:
          raise ValueError(
              """You can\'t register the same optimization
  multiple time in a DB. Tryed to register "%s" again under the new name "%s".
   Use theano.gof.ProxyDB to work around that"""
              % (obj.name, name)
          )
      self.__db__[name] = OrderedSet([obj])
      self._names.add(name)
      self.__db__[obj.__class__.__name__].add(obj)
      self.add_tags(name, *tags)
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import sys
  from theano.compat import DefaultOrderedDict
  from theano.misc.ordered_set import OrderedSet
  from six import StringIO, integer_types
  from theano.gof import opt
  from theano import config
label_desc: Use image node_id 3 for calling the DB obj's underlying member method code with example usage: obj.register(name, obj) without return types