class_docstr: Tests for the Tensor(ndarray) subclass
class_docstr_tok: ["Tests","for","the","Tensor","(","ndarray",")","subclass"]
docstr: Test that the value of requires_grad can be changed
  on an instantiated object
docstr_tok: ["Test","that","the","value","of","requires_grad","can","be","changed","on","an","instantiated","object"]
code: def test_requires_grad_setter(self):
      """Test that the value of requires_grad can be changed
      on an instantiated object"""
      # default value is true
      x = np.tensor([0, 1, 2])
      assert x.requires_grad
  
      x.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 2 for calling the TestTensor obj's underlying member method code with example usage: obj.test_requires_grad_setter() without return types