class_docstr: Test initialization of the ParametrizedHamiltonian class
docstr: Test repr method with class objects r
  eturns expected string
docstr_tok: ["Test","repr","method","with","class","objects","r","eturns","expected","string"]
code: def test_repr_with_class_objects(self):
      """Test repr method with class objects r
      eturns expected string"""
  
      class f3:  # pylint: disable=too-few-public-methods
          """Dummy class"""
  
          def __init__(self, hyper_param):
              self.hyper = hyper_param
  
          def __call__(self, p, t):
              return self.hyper * p * t
  
      coeffs = [2.0, f1, f2, f3(0.5)]
      observables = [
          qml.PauliX(0),
          qml.PauliY(0),
          qml.PauliZ(0),
          qml.PauliX(0),
      ]
      H = ParametrizedHamiltonian(coeffs, observables)
      expected = "(2.0*(PauliX(wires=[0])))+(f1(params_0,t)*(PauliY(wires=[0])))+(f2(params_1,t)*(PauliZ(wires=[0])))+(f3(params_2,t)*(PauliX(wires=[0])))"
      assert repr(H).replace("\n", "").replace(" ", "") == expected
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.pulse import ParametrizedHamiltonian
  from pennylane.wires import Wires
label_desc: Use image node_id 9 for calling the TestInitialization obj's underlying member method code with example usage: obj.test_repr_with_class_objects() and returns: unknown