code: def debug(msg):
      '''
      Displays debug messages to stderr only if the Python interpreter was invoked with the -O flag.
      '''
      if DEBUG:
          sys.stderr.write("DEBUG: " + msg + "\n")
          sys.stderr.flush(f debug(msg):
      '''
      Displays debug messages to stderr only if the Python interpreter was invoked with the -O flag.
      '''
      if DEBUG:
          sys.stderr.write("DEBUG: " + msg + "\n")
          sys.stderr.flush()
docs: Displays debug messages to stderr only if the Python interpreter was invoked with the -O flag.