code: def deprecated_method(replacement):
      """A decorator which can be used to mark a method as deprecated
      'replcement' is the method name which will be called instead.
      """
  
      def outer(fun):
          msg = (
              "%s() is deprecated and will be removed; use %s() instead"
              % (fun.__name__, replacement)
          )
          if fun.__doc__ is None:
              fun.__doc__ = msg
  
          @functools.wraps(fun)
          def inner(self, *args, **kwargs):
              warnings.warn(
                  msg, category=DeprecationWarning, stacklevel=2
              )
              return getattr(self, replacement)(*args, **kwargs)
  
          return inner
  
      return outer
  
imports: from __future__ import division, print_function
  import contextlib
  import errno
  import functools
  import os
  import socket
  import stat
  import sys
  import threading
  import warnings
  from collections import defaultdict
  from collections import namedtuple
  from socket import AF_INET
  from socket import SOCK_DGRAM
  from socket import SOCK_STREAM
label_desc: Use image node_id 11 for calling a global function with example usage: deprecated_method(replacement) and returns: outer, inner, getattr