code: def get_optparser(
      cmdpath, usage=None, prog_prefix="mne", version=None
  ):
      """Create OptionParser with cmd specific settings (e.g., prog value)."""
      # Fetch description
      mod = load_module("__temp", cmdpath)
      if mod.__doc__:
          doc, description, epilog = mod.__doc__, None, None
  
          doc_lines = doc.split("\n")
          description = doc_lines[0]
          if len(doc_lines) > 1:
              epilog = "\n".join(doc_lines[1:])
  
      # Get the name of the command
      command = os.path.basename(cmdpath)
      command, _ = os.path.splitext(command)
      command = command[
          len(prog_prefix) + 1 :
      ]  # +1 is for `_` character
  
      # Set prog
      prog = prog_prefix + f" {command}"
  
      # Set version
      if version is None:
          version = mne.__version__
  
      # monkey patch OptionParser to not wrap epilog
      OptionParser.format_epilog = lambda self, formatter: self.epilog
      parser = OptionParser(
          prog=prog,
          version=version,
          description=description,
          epilog=epilog,
          usage=usage,
      )
  
      return parser
  
file_path: mne-python/mne/commands/utils.py
imports: import glob
  import importlib
  import os
  import os.path
  import sys
  from optparse import OptionParser
  import mne
label_desc: Use image node_id 3 for calling a global function with example usage: get_optparser(cmdpath, usage, prog_prefix, version) and returns: parser