code: def parse_docstring(thing):
      
      assert not isinstance(thing, bytes)
      doc = cleandoc(thing) if isinstance(thing, str) else getdoc(thing)
      doc = empty if doc is None else doc
      assert not isinstance(doc, bytes)
      # Break the docstring into two parts: title and body.
      parts = docstring_split(doc)
      if len(parts) == 2:
          title, body = parts[0], parts[1]
      else:
          title, body = parts[0], empty
      # Remove line breaks from the title line.
      title = remove_line_breaks(title)
      # Normalise line-breaks on newline.
      body = body.replace("\r\n", newline).replace("\r", newline)
      return docstring(title, body)
docs: Parse a Python docstring, or the docstring found on `thing`.
  
      :return: a ``(title, body)`` tuple. As per docstring convention, title is
          the docstring's first paragraph and body is the rest.