code: def copy_doc_without_fig(from_fn, to_method):
      """
      Copy docstring from a plotly.io function to a Figure method, removing the
      fig argument docstring in the process
      """
      docstr = _re.sub(
          r" {4}fig:(?:.*?\n)*? {4}(\w+)", r"    \1", from_fn.__doc__
      )
      if sys.version_info[0] < 3:
          to_method.__func__.__doc__ = docstr
      else:
          to_method.__doc__ = docstr
  
imports: from __future__ import absolute_import
  import re
  import plotly.io
  from plotly.basedatatypes import BaseFigure
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: copy_doc_without_fig(from_fn, to_method) without return types