code: def embedding(
      weights: paddle.Tensor,
      indices: paddle.Tensor,
      /,
      *,
      max_norm: Optional[int] = None,
      out=None,
  ) -> paddle.Tensor:
      ivy.utils.assertions.check_equal(
          weights.ndim, 2, message="weights must be 2-d", as_array=False
      )
  
      embeddings = paddle.nn.functional.embedding(
          x=indices, weight=weights
      )
      if max_norm is not None:
          norms = paddle.linalg.norm(embeddings, axis=-1, keepdim=True)
          embeddings = paddle.where(
              norms > max_norm,
              embeddings * max_norm / norms,
              embeddings,
          )
          embeddings = paddle.where(
              norms < -max_norm,
              embeddings * -max_norm / norms,
              embeddings,
          )
      return embeddings
  
imports: from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
  import paddle
  from ivy.functional.ivy.layers import _handle_padding, _depth_max_pooling_helper, _validate_max_pool_params
  from ivy.utils.exceptions import IvyNotImplementedException, IvyValueError
  from ivy.func_wrapper import with_supported_device_and_dtypes, with_unsupported_dtypes, with_supported_dtypes
  from ..None import backend_version
  import ivy
label_desc: Use image node_id 14 for calling a global function with example usage: embedding() and returns: embeddings