code: def shape(x):
      """Gets the shape of the tensor input.
  
      Note: On the TensorFlow backend, when `x` is a `tf.Tensor` with dynamic
      shape, dimensions which are dynamic in the context of a compiled function
      will have a `tf.Tensor` value instead of a static integer value.
  
      Args:
          x: A tensor. This function will try to access the `shape` attribute of
              the input tensor.
  
      Returns:
          A tuple of integers or None values, indicating the shape of the input
              tensor.
  
      Example:
  
      >>> x = keras.zeros((8, 12))
      >>> keras.ops.shape(x)
      (8, 12)
      """
      if any_symbolic_tensors((x,)):
          return x.shape
      return backend.core.shape(x)
  
imports: import numpy
  from keras import backend
  from keras.api_export import keras_export
  from keras.backend import KerasTensor
  from keras.backend import any_symbolic_tensors
  from keras.ops.operation import Operation
  from keras.utils import traceback_utils
label_desc: Use image node_id 9 for calling a global function with example usage: shape(x) and returns: backend, x