code: def makedirs_rm_exist(dir):
      """
      Make a directory, remove any existing data.
  
      Args:
          dir (str): The directory to be created.
  
      Returns:
  
      """
      if os.path.isdir(dir):
          shutil.rmtree(dir)
      os.makedirs(dir, exist_ok=True)
  
file_path: GraphGym/graphgym/utils/io.py
imports: import ast
  import json
  import os
  import shutil
label_desc: Use image node_id 8 for calling a global function with example usage: makedirs_rm_exist(dir) without return types