code: def embedding_lookup(
      params,
      ids,
      partition_strategy="mod",
      name=None,
      validate_indices=True,  # pylint: disable=unused-argument
      max_norm=None,
  ):
      """Looks up embeddings for the given `ids` from a list of tensors.
  
      This function is used to perform parallel lookups on the list of tensors in
      `params`.  It is a generalization of `tf.gather`, where `params` is
      interpreted as a partitioning of a large embedding tensor.  `params` may be
      a `PartitionedVariable` as returned by using `tf.compat.v1.get_variable()`
      with a partitioner.
  
      If `len(params) > 1`, each element `id` of `ids` is partitioned between
      the elements of `params` according to the `partition_strategy`.
      In all strategies, if the id space does not evenly divide the number of
      partitions, each of the first `(max_id + 1) % len(params)` partitions will
      be assigned one more id.
  
      If `partition_strategy` is `"mod"`, we assign each id to partition
      `p = id % len(params)`. For instance,
      13 ids are split across 5 partitions as:
      `[[0, 5, 10], [1, 6, 11], [2, 7, 12], [3, 8], [4, 9]]`
  
      If `partition_strategy` is `"div"`, we assign ids to partitions in a
      contiguous manner. In this case, 13 ids are split across 5 partitions as:
      `[[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10], [11, 12]]`
  
      If the input ids are ragged tensors, partition variables are not supported and
      the partition strategy and the max_norm are ignored.
      The results of the lookup are concatenated into a dense
      tensor. The returned tensor has shape `shape(ids) + shape(params)[1:]`.
  
      Args:
        params: A single tensor representing the complete embedding tensor, or a
          list of P tensors all of same shape except for the first dimension,
          representing sharded embedding tensors.  Alternatively, a
          `PartitionedVariable`, created by partitioning along dimension 0. Each
          element must be appropriately sized for the given `partition_strategy`.
        ids: A `Tensor` or a 'RaggedTensor' with type `int32` or `int64` containing
          the ids to be looked up in `params`.
        partition_strategy: A string specifying the partitioning strategy, relevant
          if `len(params) > 1`. Currently `"div"` and `"mod"` are supported. Default
          is `"mod"`.
        name: A name for the operation (optional).
        validate_indices: DEPRECATED. If this operation is assigned to CPU, values
          in `indices` are always validated to be within range.  If assigned to GPU,
          out-of-bound indices result in safe but unspecified behavior, which may
          include raising an error.
        max_norm: If not `None`, each embedding is clipped if its l2-norm is larger
          than this value.
  
      Returns:
        A `Tensor` or a 'RaggedTensor', depending on the input, with the same type
        as the tensors in `params`.
  
      Raises:
        ValueError: If `params` is empty.
      """
  
      """
      **Behavior Difference between CPU and GPU**
  
      Please note that when using `tf.nn.embedding_lookup` on a GPU, if an out-of-bound 
      index is encountered, a value of 0 will be stored in the corresponding output value. 
      On the other hand, when using `tf.nn.embedding_lookup` on a CPU, an error will be 
      returned if an out-of-bound index is found.
  
      This behavior difference can impact the results of your computation, especially when 
      dealing with indices that may go beyond the bounds of the tensor. 
      Make sure to be mindful of this distinction when using the `tf.nn.embedding_lookup` 
      function in your computations.
  
      **Usage Example**
  
      Here's an example demonstrating how to use `tf.nn.embedding_lookup`:
  
      ```python
      import tensorflow as tf
  
      # Example embedding matrix and indices
      embedding_matrix = tf.constant([[0.1, 0.2], [0.3, 0.4], [0.5, 0.6]])
      indices = tf.constant([1, 0, 2])
  
      # Perform embedding lookup
      embeddings = tf.nn.embedding_lookup(embedding_matrix, indices)
  
      # Print the result
      print("Embeddings:")
      print(embeddings.numpy())
      ```
      """
  
      return _embedding_lookup_and_transform(
          params=params,
          ids=ids,
          partition_strategy=partition_strategy,
          name=name,
          max_norm=max_norm,
          transform_fn=None,
      )
  
imports: from tensorflow.python.compat import compat
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import data_flow_grad
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.types import core
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 4 for calling a global function with example usage: embedding_lookup(params, ids, partition_strategy, name, validate_indices, max_norm) and returns: _embedding_lookup_and_transform