code: def register_mode(name, mode):
      """
      Add a `Mode` which can be referred to by `name` in `function`.
  
      """
      if name in predefined_modes:
          raise ValueError("Mode name already taken: %s" % name)
      predefined_modes[name] = mode
  
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 5 for calling a global function with example usage: register_mode(name, mode) without return types