code: def Input(  # pylint: disable=invalid-name
      shape=None,
      batch_size=None,
      name=None,
      dtype=None,
      sparse=None,
      tensor=None,
      ragged=None,
      type_spec=None,
      **kwargs,
  ):
      """`Input()` is used to instantiate a Keras tensor.
  
      A Keras tensor is a symbolic tensor-like object,
      which we augment with certain attributes that allow us to build a Keras model
      just by knowing the inputs and outputs of the model.
  
      For instance, if `a`, `b` and `c` are Keras tensors,
      it becomes possible to do:
      `model = Model(input=[a, b], output=c)`
  
      Args:
          shape: A shape tuple (integers), not including the batch size.
              For instance, `shape=(32,)` indicates that the expected input
              will be batches of 32-dimensional vectors. Elements of this tuple
              can be None; 'None' elements represent dimensions where the shape is
              not known.
          batch_size: optional static batch size (integer).
          name: An optional name string for the layer.
              Should be unique in a model (do not reuse the same name twice).
              It will be autogenerated if it isn't provided.
          dtype: The data type expected by the input, as a string
              (`float32`, `float64`, `int32`...)
          sparse: A boolean specifying whether the placeholder to be created is
              sparse. Only one of 'ragged' and 'sparse' can be True. Note that,
              if `sparse` is False, sparse tensors can still be passed into the
              input - they will be densified with a default value of 0.
          tensor: Optional existing tensor to wrap into the `Input` layer.
              If set, the layer will use the `tf.TypeSpec` of this tensor rather
              than creating a new placeholder tensor.
          ragged: A boolean specifying whether the placeholder to be created is
              ragged. Only one of 'ragged' and 'sparse' can be True. In this case,
              values of 'None' in the 'shape' argument represent ragged dimensions.
              For more information about RaggedTensors, see
              [this guide](https://www.tensorflow.org/guide/ragged_tensors).
          type_spec: A `tf.TypeSpec` object to create the input placeholder from.
              When provided, all other args except name must be None.
          **kwargs: deprecated arguments support. Supports `batch_shape` and
              `batch_input_shape`.
  
      Returns:
        A `tensor`.
  
      Example:
  
      ```python
      # this is a logistic regression in Keras
      x = Input(shape=(32,))
      y = Dense(16, activation='softmax')(x)
      model = Model(x, y)
      ```
  
      Note that even if eager execution is enabled,
      `Input` produces a symbolic tensor-like object (i.e. a placeholder).
      This symbolic tensor-like object can be used with lower-level
      TensorFlow ops that take tensors as inputs, as such:
  
      ```python
      x = Input(shape=(32,))
      y = tf.square(x)  # This op will be treated like a layer
      model = Model(x, y)
      ```
  
      (This behavior does not work for higher-order TensorFlow APIs such as
      control flow and being directly watched by a `tf.GradientTape`).
  
      However, the resulting model will not track any variables that were
      used as inputs to TensorFlow ops. All variable usages must happen within
      Keras layers to make sure they will be tracked by the model's weights.
  
      The Keras Input can also create a placeholder from an arbitrary `tf.TypeSpec`,
      e.g:
  
      ```python
      x = Input(type_spec=tf.RaggedTensorSpec(shape=[None, None],
                                              dtype=tf.float32, ragged_rank=1))
      y = x.values
      model = Model(x, y)
      ```
      When passing an arbitrary `tf.TypeSpec`, it must represent the signature of an
      entire batch instead of just one example.
  
      Raises:
        ValueError: If both `sparse` and `ragged` are provided.
        ValueError: If both `shape` and (`batch_input_shape` or `batch_shape`) are
          provided.
        ValueError: If `shape`, `tensor` and `type_spec` are None.
        ValueError: If arguments besides `type_spec` are non-None while `type_spec`
                    is passed.
        ValueError: if any unrecognized parameters are provided.
      """
      if sparse and ragged:
          raise ValueError(
              "Cannot set both sparse and ragged to True in a Keras input."
          )
  
      input_layer_config = {
          "name": name,
          "dtype": dtype,
          "sparse": sparse,
          "ragged": ragged,
          "input_tensor": tensor,
          "type_spec": type_spec,
      }
  
      batch_input_shape = kwargs.pop(
          "batch_input_shape", kwargs.pop("batch_shape", None)
      )
      if shape is not None and batch_input_shape is not None:
          raise ValueError(
              "Only provide the `shape` OR `batch_input_shape` argument "
              "to Input, not both at the same time."
          )
      if (
          batch_input_shape is None
          and shape is None
          and tensor is None
          and type_spec is None
      ):
          raise ValueError(
              "Please provide to Input a `shape`"
              " or a `tensor` or a `type_spec` argument. Note that "
              "`shape` does not include the batch "
              "dimension."
          )
      if kwargs:
          raise ValueError(
              "Unrecognized keyword arguments:", kwargs.keys()
          )
  
      if batch_input_shape:
          shape = batch_input_shape[1:]
          input_layer_config.update(
              {"batch_input_shape": batch_input_shape}
          )
      else:
          input_layer_config.update(
              {"batch_size": batch_size, "input_shape": shape}
          )
      input_layer = InputLayer(**input_layer_config)
  
      # Return tensor including `_keras_history`.
      # Note that in this case train_output and test_output are the same pointer.
      outputs = input_layer._inbound_nodes[0].outputs
      if isinstance(outputs, list) and len(outputs) == 1:
          return outputs[0]
      else:
          return outputs
  
file_path: tensorflow/tensorflow/python/keras/engine/input_layer.py
imports: from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.distribute import distributed_training_utils
  from tensorflow.python.keras.engine import base_layer
  from tensorflow.python.keras.engine import keras_tensor
  from tensorflow.python.keras.engine import node
  from tensorflow.python.keras.saving.saved_model import layer_serialization
  from tensorflow.python.keras.utils import tf_utils
label_desc: Use image node_id 2 for calling a global function with example usage: Input(shape, batch_size, name, dtype, sparse, tensor, ragged, type_spec) and returns: outputs, outputs