code: def main(args=None):
      """Main program function."""
      parser = _get_parser()
      opts = parser.parse_args(args)
      from_img = load(opts.infile)
  
      if opts.Volume:
          if opts.units == "mm3":
              computed_volume = mask_volume(from_img)
          elif opts.units == "vox":
              computed_volume = count_nonzero_voxels(from_img)
          else:
              raise ValueError(
                  f'{opts.units} is not a valid unit. Choose "mm3" or "vox".'
              )
          print(computed_volume)
          return 0
  
imports: import argparse
  from nibabel.imagestats import count_nonzero_voxels, mask_volume
  from nibabel.loadsave import load
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) and returns: int