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