code: def remove_file_name_whitespace(input_path: str):
      """
      Remove the whitespace in the file names for better compatibility with g_pathmgr.
      """
      for class_folder_path in os.listdir(input_path):
          # All necessary folders start with n.
          if class_folder_path[0] != "n":
              continue
  
          absolute_class_folder_path = os.path.join(
              input_path, class_folder_path
          )
          for img_file_name in os.listdir(absolute_class_folder_path):
              absolute_img_file_name = os.path.join(
                  absolute_class_folder_path, img_file_name
              )
              file_path, file_name = os.path.split(
                  absolute_img_file_name
              )
  
              new_file_name = os.path.join(
                  file_path, file_name.replace(" ", "")
              )
              os.rename(absolute_img_file_name, new_file_name)
  
file_path: vissl/extra_scripts/datasets/create_imagenet_a_data_files.py
imports: import argparse
  import os
  import numpy
  import torchvision.datasets
  from iopath.common.file_io import g_pathmgr
  from tqdm import tqdm
  from vissl.utils.download import download_and_extract_archive
  from vissl.utils.io import cleanup_dir
label_desc: Use image node_id 2 for calling a global function with example usage: remove_file_name_whitespace(input_path) without return types