code: def get_opt_parser():
      # use module docstring for help output
      p = OptionParser(
          usage=f"{sys.argv[0]} [OPTIONS] [FILE ...]\n\n" + __doc__,
          version="%prog " + nib.__version__,
      )
  
      p.add_options(
          [
              Option(
                  "-v",
                  "--verbose",
                  action="count",
                  dest="verbose",
                  default=0,
                  help="Make more noise.  Could be specified multiple times",
              ),
              Option(
                  "-H",
                  "--header-fields",
                  dest="header_fields",
                  default="all",
                  help="Header fields (comma separated) to be printed as well (if present)",
              ),
              Option(
                  "--ma",
                  "--data-max-abs-diff",
                  dest="data_max_abs_diff",
                  type=float,
                  default=0.0,
                  help="Maximal absolute difference in data between files to tolerate.",
              ),
              Option(
                  "--mr",
                  "--data-max-rel-diff",
                  dest="data_max_rel_diff",
                  type=float,
                  default=0.0,
                  help="Maximal relative difference in data between files to"
                  " tolerate. If --data-max-abs-diff is also specified,"
                  " only the data points with absolute difference greater"
                  " than that value would be considered for relative"
                  " difference check.",
              ),
              Option(
                  "--dt",
                  "--datatype",
                  dest="dtype",
                  default=np.float64,
                  help="Enter a numpy datatype such as 'float32'.",
              ),
          ]
      )
  
      return p
  
file_path: nibabel/nibabel/cmdline/diff.py
imports: import hashlib
  import os
  import re
  import sys
  from collections import OrderedDict
  from optparse import Option, OptionParser
  import numpy
  import nibabel
  import nibabel.cmdline.utils
label_desc: Use image node_id 1 for calling a global function with example usage: get_opt_parser() and returns: p