code: def main():
      args, parser = parse_args()
      for tractogram in args.tractograms:
          tractogram_format = nib.streamlines.detect_format(tractogram)
          if tractogram_format is not nib.streamlines.TrkFile:
              print(f"Skipping non TRK file: '{tractogram}'")
              continue
  
          filename, _ = os.path.splitext(tractogram)
          output_filename = filename + ".tck"
          if os.path.isfile(output_filename) and not args.force:
              print(
                  f"Skipping existing file: '{output_filename}'. Use -f to overwrite."
              )
              continue
  
          trk = nib.streamlines.load(tractogram)
          nib.streamlines.save(trk.tractogram, output_filename)
  
imports: import argparse
  import os
  import nibabel
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types