code: def warn(msg, level=2, exit_val=1):
      """Deprecated
  
      Standard warning printer. Gives formatting consistency.
  
      Output is sent to sys.stderr.
  
      Options:
  
      -level(2): allows finer control:
        0 -> Do nothing, dummy function.
        1 -> Print message.
        2 -> Print 'WARNING:' + message. (Default level).
        3 -> Print 'ERROR:' + message.
        4 -> Print 'FATAL ERROR:' + message and trigger a sys.exit(exit_val).
  
      -exit_val (1): exit value returned by sys.exit() for a level 4
      warning. Ignored for all other levels."""
  
      warnings.warn(
          "The module IPython.utils.warn is deprecated since IPython 4.0, use the standard warnings module instead",
          DeprecationWarning,
      )
      if level > 0:
          header = ["", "", "WARNING: ", "ERROR: ", "FATAL ERROR: "]
          print(header[level], msg, sep="", file=sys.stderr)
          if level == 4:
              print("Exiting.\n", file=sys.stderr)
              sys.exit(exit_val)
  
imports: from __future__ import print_function
  import sys
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: warn(msg, level, exit_val) without return types