code: def remove_folder(folder, all_content=True):
      try:
          if all_content:
              shutil.rmtree(folder)
          else:
              os.rmdir(folder)
      except Exception as ex:
          print(ex)
  
imports: import logging
  import os
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: remove_folder(folder, all_content) without return types