class_docstr: Unittests for the tracker class
class_docstr_tok: ["Unittests","for","the","tracker","class"]
code: def test_record_callback(self, mocker):
      # pylint: disable=too-few-public-methods
      class callback_wrapper:
          @staticmethod
          def callback(totals, history, latest):
              pass
  
      wrapper = callback_wrapper()
      spy = mocker.spy(wrapper, "callback")
  
      tracker = Tracker(callback=wrapper.callback)
  
      tracker.totals = {"a": 1, "b": 2}
      tracker.history = {"a": [1], "b": [1, 1]}
      tracker.latest = {"a": 1, "b": 1}
  
      tracker.record()
  
      _, kwargs_called = spy.call_args_list[-1]
  
      assert kwargs_called["totals"] == tracker.totals
      assert kwargs_called["history"] == tracker.history
      assert kwargs_called["latest"] == tracker.latest
  
file_path: pennylane/tests/test_tracker.py
imports: import pytest
  import pennylane
  from pennylane import Tracker
label_desc: Use image node_id 9 for calling the TestTrackerCoreBehavior obj's underlying member method code with example usage: obj.test_record_callback(mocker) without return types