code: def matrix_norm(
      x: paddle.Tensor,
      /,
      *,
      ord: Optional[
          Union[int, float, Literal[inf, -inf, "fro", "nuc"]]
      ] = "fro",
      axis: Optional[Tuple[int, int]] = (-2, -1),
      keepdims: bool = False,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      axis_ = list(axis)  # paddle.moveaxis doesn't support tuple axes
      if ord == "nuc":
          x = paddle.moveaxis(x, axis_, [-2, -1])
          # backend implementation is used here instead of native implementation
          # because native implementation causes issues when the return should be
          # a scalar which is solved in the backend implementation
          ret = paddle_backend.sum(
              paddle_backend.svd(x)[1],
              axis=-1,
          )
      elif ord == 1:
          ret = paddle_backend.max(
              paddle.sum(
                  paddle_backend.abs(x), axis=axis[0], keepdim=True
              ),
              axis=axis,
              keepdims=keepdims,
          )
      elif ord == -1:
          ret = paddle_backend.min(
              paddle.sum(
                  paddle_backend.abs(x), axis=axis[0], keepdim=True
              ),
              axis=axis,
              keepdims=keepdims,
          )
      elif ord == 2:
          x = paddle.moveaxis(x, axis_, [-2, -1])
          ret = paddle_backend.max(
              paddle_backend.svd(x)[1],
              axis=-1,
          )
      elif ord == -2:
          x = paddle.moveaxis(x, axis_, [-2, -1])
          ret = paddle_backend.min(
              paddle_backend.svd(x)[1],
              axis=-1,
          )
      elif ord == float("inf"):
          ret = paddle_backend.max(
              paddle.sum(paddle.abs(x), axis=axis[1], keepdim=True),
              axis=axis,
              keepdims=keepdims,
          )
      elif ord == float("-inf"):
          ret = paddle_backend.min(
              paddle.sum(paddle.abs(x), axis=axis[1], keepdim=True),
              axis=axis,
              keepdims=keepdims,
          )
      else:
          ret = paddle.linalg.norm(
              x, p=ord, axis=axis, keepdim=keepdims
          )
      if x.ndim == 2 and not keepdims:
          ret = paddle.squeeze(ret)
      elif keepdims and ord in ["nuc", -2, 2]:
          # only these norms because the use of SVD
          for dim in axis:
              # although expand_dims support tuple axes, we have to loop
              # over the axes because it faces problems when the input is a scalar
              ret = paddle_backend.expand_dims(ret, axis=dim % x.ndim)
      return ret
  
imports: import paddle
  from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
  from collections import namedtuple
  import ivy
  from ivy import inf
  from ivy.utils.exceptions import IvyNotImplementedException
  import ivy.functional.backends.paddle
  from .None import backend_version
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_unsupported_dtypes, with_supported_dtypes
  from .elementwise import _elementwise_helper
label_desc: Use image node_id 10 for calling a global function with example usage: matrix_norm() and returns: ret