code: def create_directory(path, remove_existing=False):
      # Create the directory if it doesn't exist.
      if not backend.io.exists(path):
          backend.io.makedirs(path)
  
      # If it does exist, and remove_existing is specified,
      # the directory will be removed and recreated.
      elif remove_existing:
          backend.io.rmtree(path)
          backend.io.makedirs(path)
  
file_path: keras-tuner/keras_tuner/utils.py
imports: import json
  from keras_tuner import backend
  from keras_tuner.backend import keras
label_desc: Use image node_id 2 for calling a global function with example usage: create_directory(path, remove_existing) without return types