class_docstr: Test functionality of SkorchDoctor using a simple model
class_docstr_tok: ["Test","functionality","of","SkorchDoctor","using","a","simple","model"]
code: def test_callbacks_cleaned_up_after_fit_with_initial_callbacks(
      self, doctor_cls, net_cls, module_cls, data
  ):
      # make sure that the callbacks are the same before and after, this is
      # important because SkorchDoctor will temporarily add a callback
      from skorch.callbacks import EpochScoring, GradientNormClipping
  
      net = net_cls(
          module_cls,
          callbacks=[EpochScoring("f1"), GradientNormClipping(1.0)],
      ).initialize()
      callbacks_without_doctor = net.callbacks_[:]
  
      doctor = doctor_cls(net).fit(*data)
      callbacks_with_doctor = doctor.net.callbacks_
  
      assert len(callbacks_without_doctor) == len(callbacks_with_doctor)
  
      for (name0, cb0), (name1, cb1) in zip(
          callbacks_without_doctor, callbacks_with_doctor
      ):
          assert name0 == name1
          # pylint: disable=unidiomatic-typecheck
          assert type(cb0) == type(cb1)
  
imports: import itertools
  from unittest import mock
  import numpy
  import pytest
  import torch
  from torch import nn
label_desc: Use image node_id 17 for calling the TestSkorchDoctorSimple obj's underlying member method code with example usage: obj.test_callbacks_cleaned_up_after_fit_with_initial_callbacks(doctor_cls, net_cls, module_cls, data) without return types