code: def recursive_rm_dir(dir_name):
      """Recursively removes dirs and files in ``dir_name``.
  
      This functions removes everything in ``dir_name`` that it has permission
      to remove. This function is intended to remove the dumped directory.
      Do not use this function to remove other directories,
      unless you are sure to remove everything in the directory.
  
      Parameters
      ----------
      dir_name : `str`
          The directory name to be removed.
  
      Returns
      -------
      The functions removes the directory from local file system and does not return anything.
      """
      if os.path.isdir(dir_name):
          files = os.listdir(dir_name)
          if not files:
              os.rmdir(dir_name)
          else:
              [
                  recursive_rm_dir(os.path.join(dir_name, file))
                  for file in files
              ]
              os.rmdir(dir_name)
      else:
          os.remove(dir_name)
  
file_path: greykite/greykite/framework/templates/pickle_utils.py
imports: import inspect
  import os
  import shutil
  from collections import OrderedDict
  import dill
  from patsy.design_info import DesignInfo
label_desc: Use image node_id 1 for calling a global function with example usage: recursive_rm_dir(dir_name) without return types