code: def warning_on_one_line(
      msg, category, filename, lineno, file=None, line=None
  ):
      return "%s:%s: %s:\n\n%s\n\n" % (
          filename,
          lineno,
          category.__name__,
          msg,
      )
  
imports: import warnings
  import plotly.graph_objs
  from plotly.matplotlylib.mplexporter import Renderer
  from plotly.matplotlylib import mpltools
label_desc: Use image node_id 1 for calling a global function with example usage: warning_on_one_line(msg, category, filename, lineno, file, line) and returns: unknown