class_docstr: Tests for the Tensor(ndarray) subclass
class_docstr_tok: ["Tests","for","the","Tensor","(","ndarray",")","subclass"]
docstr: Test that you can instantiate the Tensor class with the
  requires_grad argument
docstr_tok: ["Test","that","you","can","instantiate","the","Tensor","class","with","the","requires_grad","argument"]
code: def test_passing_requires_grad_arg(self):
      """Test that you can instantiate the Tensor class with the
      requires_grad argument"""
      # default value is true
      x = np.tensor([0, 1, 2])
      assert x.requires_grad
  
      x = np.tensor([0, 1, 2], requires_grad=True)
      assert x.requires_grad
  
      x = np.tensor([0, 1, 2], requires_grad=False)
      assert not x.requires_grad
  
imports: import numpy
  import pytest
  from autograd.numpy.numpy_boxes import ArrayBox
  import pennylane
  from pennylane import numpy
  from pennylane.numpy.tensor import tensor_to_arraybox
label_desc: Use image node_id 1 for calling the TestTensor obj's underlying member method code with example usage: obj.test_passing_requires_grad_arg() without return types