code: def create_eager_tensors(input_shape, dtype, sparse):
      from keras.backend import random
  
      if dtype not in [
          "float16",
          "float32",
          "float64",
          "int16",
          "int32",
          "int64",
      ]:
          raise ValueError(
              "dtype must be a standard float or int dtype. "
              f"Received: dtype={dtype}"
          )
  
      if sparse:
          import tensorflow as tf
  
          def create_fn(shape, dtype):
              min_dim = min(dim for dim in shape if dim > 1)
              x = random.uniform(shape, dtype="float32") * 3 / min_dim
              x = tf.nn.dropout(x, 1.0 / min_dim)
              x = tf.cast(x, dtype=dtype)
              return tf.sparse.from_dense(x)
  
      else:
  
          def create_fn(shape, dtype):
              return ops.cast(
                  random.uniform(shape, dtype="float32") * 3,
                  dtype=dtype,
              )
  
      if isinstance(input_shape, tuple):
          return create_fn(input_shape, dtype=dtype)
      if isinstance(input_shape, list):
          return [create_fn(s, dtype=dtype) for s in input_shape]
      if isinstance(input_shape, dict):
          return {
              utils.removesuffix(k, "_shape"): create_fn(v, dtype=dtype)
              for k, v in input_shape.items()
          }
  
imports: import json
  import shutil
  import tempfile
  import unittest
  import numpy
  import tree
  from keras import backend
  from keras import ops
  from keras import utils
  from keras.backend.common import is_float_dtype
  from keras.backend.common import standardize_dtype
  from keras.backend.common.global_state import clear_session
  from keras.backend.common.keras_tensor import KerasTensor
  from keras.models import Model
  from keras.utils import traceback_utils
label_desc: Use image node_id 2 for calling a global function with example usage: create_eager_tensors(input_shape, dtype, sparse) and returns: create_fn, unknown, unknown, tf, ops