code: def bspmm(A: SparseMatrix, X: torch.Tensor) -> torch.Tensor:
      """Multiplies a sparse matrix by a dense matrix by batches, equivalent to
      ``A @ X``.
  
      Parameters
      ----------
      A : SparseMatrix
          Sparse matrix of shape ``(L, M)`` with vector values of length ``K``
      X : torch.Tensor
          Dense matrix of shape ``(M, N, K)``
  
      Returns
      -------
      torch.Tensor
          Dense matrix of shape ``(L, N, K)``
  
      Examples
      --------
  
      >>> indices = torch.tensor([[0, 1, 1], [1, 0, 2]])
      >>> val = torch.randn(len(row), 2)
      >>> A = dglsp.spmatrix(indices, val, shape=(3, 3))
      >>> X = torch.randn(3, 3, 2)
      >>> result = dglsp.bspmm(A, X)
      >>> type(result)
      <class 'torch.Tensor'>
      >>> result.shape
      torch.Size([3, 3, 2])
      """
      assert isinstance(
          A, SparseMatrix
      ), f"Expect arg1 to be a SparseMatrix object, got {type(A)}."
      assert isinstance(
          X, torch.Tensor
      ), f"Expect arg2 to be a torch.Tensor, got {type(X)}."
      return spmm(A, X)
  
imports: from typing import Union
  import torch
  from .sparse_matrix import SparseMatrix
label_desc: Use image node_id 2 for calling a global function with example usage: bspmm(A, X) and returns: spmm