code: def register_optimizer(name, opt):
      """Add a `Optimizer` which can be referred to by `name` in `Mode`."""
      if name in predefined_optimizers:
          raise ValueError("Optimizer name already taken: %s" % name)
      predefined_optimizers[name] = opt
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  import warnings
  import theano
  from theano import gof
  import theano.gof.vm
  from theano import config
  from six import string_types
  from theano.compile.function_module import Supervisor
label_desc: Use image node_id 2 for calling a global function with example usage: register_optimizer(name, opt) without return types