code: def main():
      parser = ArgumentParser(
          description=DESCRIP,
          epilog=EPILOG,
          formatter_class=RawDescriptionHelpFormatter,
      )
      parser.add_argument(
          "in_filenames", type=str, nargs="+", help="3D image filenames"
      )
      parser.add_argument(
          "--out-4d", type=str, help="4D output image name"
      )
      parser.add_argument(
          "--check-affines",
          type=bool,
          default=True,
          help="False if you want to ignore differences "
          "in affines between the 3D images, True if you "
          "want to raise an error for significant "
          "differences (default is True)",
      )
      # parse the command line
      args = parser.parse_args()
      # get input 3ds
      filenames = args.in_filenames
      # affine check
      check_affines = args.check_affines
      # get output name
      out_fname = args.out_4d
      if out_fname is None:
          pth, fname = os.path.split(filenames[0])
          froot, ext = os.path.splitext(fname)
          if ext in (".gz", ".bz2"):
              gz = ext
              froot, ext = os.path.splitext(froot)
          else:
              gz = ""
          out_fname = pjoin(pth, froot + "_4d" + ext + gz)
      img4d = do_3d_to_4d(filenames, check_affines=check_affines)
      nib.save(img4d, out_fname)
  
imports: import os
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  from os.path import join
  import nibabel
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types