code: def test_muldiv_scalar(v_scalar):
      ctx = F.ctx()
      row = torch.tensor([1, 0, 2]).to(ctx)
      col = torch.tensor([0, 3, 2]).to(ctx)
      val = torch.randn(len(row)).to(ctx)
      A1 = from_coo(row, col, val, shape=(3, 4))
  
      # A * v
      A2 = A1 * v_scalar
      assert torch.allclose(
          A1.val * v_scalar, A2.val, rtol=1e-4, atol=1e-4
      )
      assert A1.shape == A2.shape
  
      # v * A
      A2 = v_scalar * A1
      assert torch.allclose(
          A1.val * v_scalar, A2.val, rtol=1e-4, atol=1e-4
      )
      assert A1.shape == A2.shape
  
      # A / v
      A2 = A1 / v_scalar
      assert torch.allclose(
          A1.val / v_scalar, A2.val, rtol=1e-4, atol=1e-4
      )
      assert A1.shape == A2.shape
  
      # v / A
      with pytest.raises(TypeError):
          v_scalar / A1
  
file_path: dgl/tests/python/pytorch/sparse/test_elementwise_op_sp.py
imports: import sys
  import backend
  import pytest
  import torch
  from dgl.sparse import div, from_coo, mul, power, spmatrix, val_like
  from .utils import rand_coo, rand_csc, rand_csr, rand_diag, sparse_matrix_to_dense
label_desc: Use image node_id 2 for calling a global function with example usage: test_muldiv_scalar(v_scalar) without return types