code: def einsum(
      equation: str,
      *operands: paddle.Tensor,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      equation = legalise_einsum_expr(*[equation, *operands])
  
      dtype_list = set(map(lambda x: x.dtype, operands))
      dtype = dtype_list.pop()
      if len(dtype_list) > 0:
          for d in dtype_list:
              dtype = ivy.promote_types(dtype, d)
          operands = list(
              map(
                  lambda x: x.cast(dtype) if x.dtype != dtype else x,
                  operands,
              )
          )
  
      return paddle.einsum(equation, *operands)
  
file_path: ivy/ivy/functional/backends/paddle/statistical.py
imports: from typing import Union, Optional, Sequence
  import paddle
  import ivy
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes, with_supported_device_and_dtypes
  import ivy.functional.backends.paddle
  from ivy.utils.einsum_parser import legalise_einsum_expr
  from .None import backend_version
label_desc: Use image node_id 11 for calling a global function with example usage: einsum(equation) and returns: paddle