code: def _get_docstring(obj):
      doc_string = inspect.getdoc(obj)
  
      # Sometimes an object has no docstring, but the object's type does.
      # If that's the case here, use the type's docstring.
      # For objects where type is "type" we do not print the docs (e.g. int).
      # We also do not print the docs for functions and methods if the docstring is empty.
      if doc_string is None:
          obj_type = type(obj)
  
          if (
              obj_type is not type
              and obj_type is not types.ModuleType
              and not inspect.isfunction(obj)
              and not inspect.ismethod(obj)
          ):
              doc_string = inspect.getdoc(obj_type)
  
      if doc_string:
          return doc_string.strip()
  
      return None
  
imports: import ast
  import contextlib
  import inspect
  import re
  import types
  from typing import TYPE_CHECKING, Any, cast
  from typing_extensions import Final
  import streamlit
  from streamlit.logger import get_logger
  from streamlit.proto.DocString_pb2 import DocString
  from streamlit.proto.DocString_pb2 import Member
  from streamlit.runtime.metrics_util import gather_metrics
  from streamlit.runtime.scriptrunner.script_runner import __file__
  from streamlit.runtime.secrets import Secrets
  from streamlit.string_util import is_mem_address_str
label_desc: Use image node_id 5 for calling a global function with example usage: _get_docstring(obj) and returns: None, doc_string