code: def test_error_op_sparse_diag(op):
      ctx = F.ctx()
      row = torch.tensor([1, 0, 2]).to(ctx)
      col = torch.tensor([0, 3, 2]).to(ctx)
      val = torch.randn(row.shape).to(ctx)
      A = dglsp.from_coo(row, col, val)
  
      shape = (3, 4)
      D = dglsp.diag(torch.randn(row.shape[0]).to(ctx), shape=shape)
  
      with pytest.raises(TypeError):
          getattr(operator, op)(A, D)
      with pytest.raises(TypeError):
          getattr(operator, op)(D, A)
  
file_path: dgl/tests/python/pytorch/sparse/test_elementwise_op.py
imports: import operator
  import backend
  import dgl.sparse
  import pytest
  import torch
  from dgl.sparse import diag, power
label_desc: Use image node_id 9 for calling a global function with example usage: test_error_op_sparse_diag(op) without return types