code: def deprecated(filename, msg=""):
      """
      Decorator which will print a warning message on the first call.
  
      Use it like this::
  
        @deprecated('myfile', 'do something different...')
        def fn_name(...)
            ...
  
      And it will print::
  
        WARNING myfile.fn_name deprecated. do something different...
  
      """
  
      def _deprecated(f):
          printme = [True]
  
          def g(*args, **kwargs):
              if printme[0]:
                  print(
                      "WARNING: %s.%s deprecated. %s"
                      % (filename, f.__name__, msg)
                  )
                  printme[0] = False
              return f(*args, **kwargs)
  
          return g
  
      return _deprecated
  
imports: from __future__ import absolute_import, print_function, division
  import linecache
  import sys
  import traceback
  import numpy
  from six import iteritems, integer_types, string_types, with_metaclass
  from six.moves import StringIO
  from theano import config
  from theano.compat import PY3
label_desc: Use image node_id 6 for calling a global function with example usage: deprecated(filename, msg) and returns: _deprecated, g, f