code: def diagonal(
      x: Union[(None, mx.ndarray.NDArray)],
      /,
      *,
      offset: int = 0,
      axis1: int = (-2),
      axis2: int = (-1),
      out: Optional[Union[(None, mx.ndarray.NDArray)]] = None,
  ) -> Union[(None, mx.ndarray.NDArray)]:
      raise IvyNotImplementedException()
  
imports: import mxnet
  from typing import Union, Optional, Tuple, Literal, List, Sequence
  from collections import namedtuple
  from ivy import inf
  from ivy.utils.exceptions import IvyNotImplementedException
label_desc: Use image node_id 4 for calling a global function with example usage: diagonal() without return types