code: def cp_rm(filepath, output_dir):
      # delete txt/json
      for file in os.listdir(filepath):
          if file.endswith(".txt") or file.endswith(".json"):
              os.remove(os.path.join(filepath, file))
      # move images to output dir
      target_dir = os.path.join(output_dir, "images")
      if not os.path.exists(os.path.join(output_dir, "images")):
          os.mkdir(os.path.join(output_dir, "images"))
      os.system("mv -f {} {}".format(filepath, target_dir))
  
file_path: mmdetection/tools/dataset_converters/grit_processing.py
imports: import argparse
  import json
  import logging
  import os
  import tarfile
  from functools import partial
  from multiprocessing import Pool
label_desc: Use image node_id 5 for calling a global function with example usage: cp_rm(filepath, output_dir) without return types