code: def rm_file(path, regex=False):
      if regex:
          file_list = glob.glob(path, recursive=True)
      else:
          file_list = [path]
      for file in file_list:
          path = Path(file)
          if os.path.exists(path):
              print(f"Removing file : {path}")
              os.remove(path)
  
file_path: serve/ts_scripts/shell_utils.py
imports: import requests
  import os
  import shutil
  import glob
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: rm_file(path, regex) without return types