code: def test_torch_nn_pure_function():
      from deepchem.utils.differentiation_utils import get_pure_function
  
      class A(torch.nn.Module):
          def __init__(self, a):
              super().__init__()
              self.b = torch.nn.Parameter(torch.tensor(a * a))
  
          def forward(self, x):
              return self.b * x
  
      B = A(4.0)
      m = get_pure_function(B.forward)
      m.set_objparams([3.0])
      assert m(2) == 6.0
  
imports: import pytest
label_desc: Use image node_id 33 for calling a global function with example usage: test_torch_nn_pure_function() and returns: unknown