code: def handle_docstring(text, polite=True):
      """Take care of empty and non existing doc strings."""
      if text is None or not len(text):
          if polite:
              return ""  # No documentation found. Sorry!'
          else:
              return ""
      else:
          # Problem is that first line might often have no offset, so might
          # need to be ignored from dedent call
          if not text.startswith(" "):
              lines = text.split("\n")
              text2 = "\n".join(lines[1:])
              return lines[0] + "\n" + textwrap.dedent(text2)
          else:
              return textwrap.dedent(text)
  
file_path: datalad/datalad/dochelpers.py
imports: import logging
  import re
  import textwrap
  import os
  import sys
  import traceback
  from datalad.support.exceptions import CapturedException
label_desc: Use image node_id 4 for calling a global function with example usage: handle_docstring(text, polite) and returns: str, str, unknown, textwrap