code: def _diag(
      diagonal,
      name=None,
      k=0,
      num_rows=-1,
      num_cols=-1,
      padding_value=0.0,
      align="RIGHT_LEFT",
  ):
      del name
      diagonal = ops.convert_to_tensor(diagonal)
      if (
          k != 0
          or num_rows != -1
          or num_cols != -1
          or padding_value != 0.0
          or align != "RIGHT_LEFT"
      ):
          raise NotImplementedError(
              (k, num_rows, num_cols, padding_value, align)
          )
      return _set_diag(
          np.zeros(
              diagonal.shape + (diagonal.shape[-1],),
              dtype=diagonal.dtype,
          ),
          diagonal,
      )
  
imports: import collections
  import functools
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy import ops
label_desc: Use image node_id 5 for calling a global function with example usage: _diag(diagonal, name, k, num_rows, num_cols, padding_value, align) and returns: _set_diag