code: def constant_pad(
      x: paddle.Tensor,
      /,
      pad_width: List[List[int]],
      *,
      value: Number = 0.0,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      paddings = []
      pad_width = list(pad_width)
      for item in pad_width:
          if len(item) != 2:
              raise ivy.utils.exceptions.IvyException(
                  "Length of each item should be 2"
              )
          else:
              paddings.append(item[0])
              paddings.append(item[1])
      return paddle.nn.functional.pad(x=x, pad=paddings, value=value)
  
imports: from numbers import Number
  from typing import Union, Optional, Tuple, List, Sequence, Iterable
  import math
  import paddle
  import ivy
  import ivy.functional.backends.paddle
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  from ...ivy.manipulation import _calculate_out_shape
label_desc: Use image node_id 13 for calling a global function with example usage: constant_pad(pad_width) and returns: paddle