code: def eye(N, M=0, k=0, ctx=None, dtype=None, **kwargs):
      
      # pylint: disable= unused-argument
      if ctx is None:
          ctx = current_context()
      dtype = mx_real_t if dtype is None else dtype
      # pylint: disable= no-member, protected-access
      return _internal._eye(N=N, M=M, k=k, ctx=ctx, dtype=dtype, **kwargs)
docs: Return a 2-D array with ones on the diagonal and zeros elsewhere.
  
      Parameters
      ----------
      N: int
          Number of rows in the output.
      M: int, optional
          Number of columns in the output. If 0, defaults to N.
      k: int, optional
          Index of the diagonal: 0 (the default) refers to the main diagonal,
          a positive value refers to an upper diagonal,
          and a negative value to a lower diagonal.
      ctx: Context, optional
          An optional device context (default is the current default context)
      dtype: str or numpy.dtype, optional
          An optional value type (default is `float32`)
  
      Returns
      -------
      NDArray
          A created array
  
      Examples
      --------
      >>> mx.nd.eye(2)
      [[ 1.  0.]
       [ 0.  1.]]
      <NDArray 2x2 @cpu(0)>
      >>> mx.nd.eye(2, 3, 1)
      [[ 0.  1.  0.]
       [ 0.  0.  1.]]
      <NDArray 2x3 @cpu(0)>