code: def main(args=None):
      ner_data_dir = get_default_paths()["NER_DATA_DIR"]
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--input_filename",
          type=str,
          default="data/ner/en_foreign-4class.test.json",
          help="Convert an individual file",
      )
      parser.add_argument(
          "--input_dir",
          type=str,
          default=ner_data_dir,
          help="Which directory to find the dataset, if using --input_dataset",
      )
      parser.add_argument(
          "--input_dataset", type=str, help="Convert an entire dataset"
      )
      parser.add_argument(
          "--output_suffix",
          type=str,
          default="bioes",
          help="suffix for output filenames",
      )
      args = parser.parse_args(args)
  
      if args.input_dataset:
          input_filenames = [
              os.path.join(
                  args.input_dir,
                  "%s.%s.json" % (args.input_dataset, shard),
              )
              for shard in ("train", "dev", "test")
          ]
      else:
          input_filenames = [args.input_filename]
      for input_filename in input_filenames:
          output_filename = (
              os.path.splitext(input_filename)[0]
              + "."
              + args.output_suffix
          )
          print("%s -> %s" % (input_filename, output_filename))
          convert_json_to_bio(input_filename, output_filename)
  
imports: import argparse
  import json
  import os
  from stanza.models.common.doc import Document
  from stanza.models.ner.utils import process_tags
  from stanza.utils.default_paths import get_default_paths
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types