code: def dropout(inputs, rate, noise_shape=None, seed=None):
      seed = draw_seed(seed)
  
      keep_prob = 1.0 - rate
  
      # If noise_shape is not provided, use the shape of inputs
      if noise_shape is None:
          noise_shape = inputs.shape
      else:
          # If noise_shape is provided, replace None with corresponding
          # input shape
          noise_shape = [
              n if n is not None else inputs.shape[i]
              for i, n in enumerate(noise_shape)
          ]
  
      rng = np.random.default_rng(seed)
      mask = rng.uniform(size=noise_shape) < keep_prob
      mask = np.broadcast_to(mask, inputs.shape)
      return np.where(mask, inputs / keep_prob, np.zeros_like(inputs))
  
file_path: keras/keras/backend/numpy/random.py
imports: import numpy
  from keras.backend.config import floatx
  from keras.backend.numpy.nn import softmax
  from keras.random.seed_generator import SeedGenerator
  from keras.random.seed_generator import draw_seed
  from keras.random.seed_generator import make_default_seed
label_desc: Use image node_id 6 for calling a global function with example usage: dropout(inputs, rate, noise_shape, seed) and returns: np