code: def _strip_header(doc):
      """Strip Matlab header and splash info off doc.
  
      Searches for the tag 'NIPYPE' in the doc and returns everything after that.
  
      """
      hdr = "NIPYPE"
      # There's some weird cruft at the end of the docstring, almost looks like
      # the hex for the escape character 0x1b.
      cruft = "\x1b"
      try:
          index = doc.index(hdr)
      except ValueError as e:
          raise OSError(
              "This docstring was not generated by Nipype!\n"
          ) from e
  
      index += len(hdr)
      index += 1
      doc = doc[index:]
      try:
          index = doc.index(cruft)
      except ValueError:
          index = len(doc)
      return doc[:index]
  
imports: import os
  from ..interfaces import matlab
label_desc: Use image node_id 2 for calling a global function with example usage: _strip_header(doc) and returns: doc