code: def matrix_norm(
      x: Union[tf.Tensor, tf.Variable],
      /,
      *,
      ord: Union[int, float, Literal[inf, -inf, "fro", "nuc"]] = "fro",
      axis: Tuple[int, int] = (-2, -1),
      keepdims: bool = False,
      out: Optional[Union[tf.Tensor, tf.Variable]] = None,
  ) -> Union[tf.Tensor, tf.Variable]:
      if ord == "nuc":
          x = tf.experimental.numpy.moveaxis(x, axis, (-2, -1))
          ret = tf.reduce_sum(
              tf.linalg.svd(x, compute_uv=False),
              axis=-1,
          )
      elif ord == -1:
          ret = tf.reduce_min(
              tf.reduce_sum(tf.abs(x), axis=axis[0], keepdims=True),
              axis=axis,
              keepdims=keepdims,
          )
      elif ord == -2:
          x = tf.experimental.numpy.moveaxis(x, axis, (-2, -1))
          ret = tf.reduce_min(
              tf.linalg.svd(x, compute_uv=False),
              axis=-1,
          )
      elif ord == float("-inf"):
          ret = tf.reduce_min(
              tf.reduce_sum(tf.abs(x), axis=axis[1], keepdims=True),
              axis=axis,
              keepdims=keepdims,
          )
      else:
          ret = tf.norm(x, ord=ord, axis=axis, keepdims=keepdims)
      ret = tf.cast(ret, ret.dtype.real_dtype)
      if keepdims and ord in [-2, "nuc"]:
          for dim in axis:
              ret = tf.expand_dims(ret, dim % tf.rank(x))
      return ret
  
imports: from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
  from collections import namedtuple
  import tensorflow
  from tensorflow.python.framework.dtypes import DType
  import ivy
  from ivy import inf
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
label_desc: Use image node_id 11 for calling a global function with example usage: matrix_norm() and returns: ret