class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Test that the id attribute can be set.
docstr_tok: ["Test","that","the","id","attribute","can","be","set","."]
code: def test_id(self):
      """Test that the id attribute can be set."""
      template = qml.BasisRotation(
          wires=range(2),
          unitary_matrix=qml.math.array(
              [
                  [-0.77228482 + 0.0j, -0.02959195 + 0.63458685j],
                  [0.63527644 + 0.0j, -0.03597397 + 0.77144651j],
              ]
          ),
          id="a",
      )
      assert template.id == "a"
  
file_path: pennylane/tests/templates/test_subroutines/test_basis_rotation.py
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 2 for calling the TestInputs obj's underlying member method code with example usage: obj.test_id() without return types