class_docstr: DiagonalOf(M) will create a matrix expression that
  is equivalent to the diagonal of `M`, represented as
  a single column matrix.
  
  Examples
  ========
  
  >>> from sympy import MatrixSymbol, DiagonalOf, Symbol
  >>> n = Symbol('n', integer=True)
  >>> m = Symbol('m', integer=True)
  >>> x = MatrixSymbol('x', 2, 3)
  >>> diag = DiagonalOf(x)
  >>> diag.shape
  (2, 1)
  
  The diagonal can be addressed like a matrix or vector and will
  return the corresponding element of the original matrix:
  
  >>> diag[1, 0] == diag[1] == x[1, 1]
  True
  
  The length of the diagonal -- the lesser of the two dimensions of `M` --
  is accessed through the `diagonal_length` property:
  
  >>> diag.diagonal_length
  2
  >>> DiagonalOf(MatrixSymbol('x', n + 1, n)).diagonal_length
  n
  
  When only one of the dimensions is symbolic the other will be
  treated as though it is smaller:
  
  >>> dtall = DiagonalOf(MatrixSymbol('x', n, 3))
  >>> dtall.diagonal_length
  3
  
  When the size of the diagonal is not known, a value of None will
  be returned:
  
  >>> DiagonalOf(MatrixSymbol('x', n, m)).diagonal_length is None
  True
code: def _entry(self, i, j, **kwargs):
      return self.arg._entry(i, i, **kwargs)
  
imports: from sympy.core.sympify import _sympify
  from sympy.matrices.expressions import MatrixExpr
  from sympy.core import S, Eq, Ge
  from sympy.core.mul import Mul
  from sympy.functions.special.tensor_functions import KroneckerDelta
label_desc: Use image node_id 3 for calling the DiagonalOf obj's underlying member method code with example usage: obj._entry(i, j) and returns: self