code: def grab_doc(task_name):
      """Grab the SPM documentation for the given SPM task named `task_name`
  
      Parameters
      ----------
      task_name : string
          Task name for which we are grabbing documentation.  Example
          task names are ``Realign: Estimate & Reslice``, ``Normalise:
          Estimate & Write``.
  
      See Also
      --------
      spm_flat_config.m : This function can print out all the possible
          task names.
  
      """
  
      cmd = matlab.MatlabCommand(resource_monitor=False)
      # We need to tell Matlab where to find our spm_get_doc.m file.
      cwd = os.path.dirname(__file__)
      # Build matlab command
      mcmd = f"addpath('{cwd}');spm_get_doc('{task_name}')"
      cmd.inputs.script_lines = mcmd
      # Run the command and get the documentation out of the result.
      out = cmd.run()
      return _strip_header(out.runtime.stdout)
  
imports: import os
  from ..interfaces import matlab
label_desc: Use image node_id 1 for calling a global function with example usage: grab_doc(task_name) and returns: _strip_header