code: def truncated_normal(
      shape, mean=0.0, stddev=1.0, dtype=None, seed=None
  ):
      dtype = dtype or floatx()
      seed = draw_seed(seed)
      rng = np.random.default_rng(seed)
  
      lower_bound = mean - 2 * stddev
      upper_bound = mean + 2 * stddev
  
      flat_shape = np.prod(shape)
      random_numbers = np.empty(0)
  
      # loop until we have enough valid numbers to fill our desired shape
      while random_numbers.shape[0] < flat_shape:
          # Generate a batch of random numbers from a normal distribution
          batch = rng.normal(loc=mean, scale=stddev, size=flat_shape)
  
          # Filter the numbers to keep only those within the specified bounds
          valid = batch[(batch >= lower_bound) & (batch <= upper_bound)]
  
          # Append the valid numbers to the result array
          random_numbers = np.append(random_numbers, valid)
  
      # Truncate the result array to the desired size and reshape it
      return random_numbers[:flat_shape].astype(dtype).reshape(shape)
  
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 5 for calling a global function with example usage: truncated_normal(shape, mean, stddev, dtype, seed) and returns: random_numbers