code: def test_fill_diagonal():
      a = tensor(np.random.rand(10, 13))
      fill_diagonal(a, 10)
  
      assert a.shape == (10, 13)
  
      # must be Tensor
      with pytest.raises(TypeError):
          fill_diagonal(np.random.rand(11, 10), 1)
  
      # at least 2-d required
      with pytest.raises(ValueError):
          a = tensor(np.random.rand(4))
          fill_diagonal(a, 1)
  
      # for more than 2-d, shape on each dimension should be equal
      with pytest.raises(ValueError):
          a = tensor(np.random.rand(11, 10, 11))
          fill_diagonal(a, 1)
  
imports: import numpy
  import pytest
  from ....config import option_context
  from ....core import tile
  from ...base.broadcast_to import TensorBroadcastTo
  from ...datasource import ones, tensor, array, empty
  from ...datasource.ones import TensorOnes
  from ...merge.concatenate import TensorConcatenate
  from ..None import choose, unravel_index, nonzero, compress, fill_diagonal
  from ..setitem import TensorIndexSetValue
label_desc: Use image node_id 16 for calling a global function with example usage: test_fill_diagonal() without return types