code: def _copy_docstring(lib, function):
      """Extract docstring from function."""
      import importlib
  
      try:
          module = importlib.import_module(lib)
          func = getattr(module, function)
          doc = func.__doc__
      except ImportError:
          doc = f"Failed to import function {function} from {lib}"
  
      if not isinstance(doc, str):
          doc = ""
      return doc
  
file_path: arviz/arviz/plots/backends/__init__.py
imports: import re
  import numpy
  from pandas import DataFrame
  from ...rcparams import rcParams
label_desc: Use image node_id 7 for calling a global function with example usage: _copy_docstring(lib, function) and returns: doc