code: def test_add_linear_operator():
      from deepchem.utils.differentiation_utils import LinearOperator
  
      class Operator(LinearOperator):
          def __init__(
              self, mat: torch.Tensor, is_hermitian: bool
          ) -> None:
              super(Operator, self).__init__(
                  shape=mat.shape,
                  is_hermitian=is_hermitian,
                  dtype=mat.dtype,
                  device=mat.device,
                  _suppress_hermit_warning=True,
              )
              self.mat = mat
  
          def _mv(self, x: torch.Tensor) -> torch.Tensor:
              return torch.matmul(self.mat, x.unsqueeze(-1)).squeeze(-1)
  
          def _mm(self, x: torch.Tensor) -> torch.Tensor:
              return torch.matmul(self.mat, x)
  
          def _rmv(self, x: torch.Tensor) -> torch.Tensor:
              return torch.matmul(
                  self.mat.transpose(-3, -1).conj(), x.unsqueeze(-1)
              ).squeeze(-1)
  
          def _rmm(self, x: torch.Tensor) -> torch.Tensor:
              return torch.matmul(self.mat.transpose(-2, -1).conj(), x)
  
          def _fullmatrix(self) -> torch.Tensor:
              return self.mat
  
          def _getparamnames(self, prefix: str = ""):
              return [prefix + "mat"]
  
      op = Operator(
          torch.tensor([[1, 2.0], [3, 4]]), is_hermitian=False
      )
      x = torch.tensor([[2, 2], [1, 2.0]])
      op2 = op + op
      assert torch.allclose(op2.mm(x), 2 * op.mm(x))
  
imports: import pytest
label_desc: Use image node_id 16 for calling a global function with example usage: test_add_linear_operator() and returns: torch, torch, torch, torch, self, list