code: def check_callbacks_equality(self, cbs1, cbs2):
      self.assertEqual(len(cbs1), len(cbs2))
  
      # Order doesn't matter
      cbs1 = list(
          sorted(
              cbs1,
              key=lambda cb: cb.__name__
              if isinstance(cb, type)
              else cb.__class__.__name__,
          )
      )
      cbs2 = list(
          sorted(
              cbs2,
              key=lambda cb: cb.__name__
              if isinstance(cb, type)
              else cb.__class__.__name__,
          )
      )
  
      for cb1, cb2 in zip(cbs1, cbs2):
          if isinstance(cb1, type) and isinstance(cb2, type):
              self.assertEqual(cb1, cb2)
          elif isinstance(cb1, type) and not isinstance(cb2, type):
              self.assertEqual(cb1, cb2.__class__)
          elif not isinstance(cb1, type) and isinstance(cb2, type):
              self.assertEqual(cb1.__class__, cb2)
          else:
              self.assertEqual(cb1, cb2)
  
imports: import shutil
  import tempfile
  import unittest
  from unittest.mock import patch
  from transformers import DefaultFlowCallback, IntervalStrategy, PrinterCallback, ProgressCallback, Trainer, TrainerCallback, TrainingArguments, is_torch_available
  from transformers.testing_utils import require_torch
label_desc: Use image node_id 4 for calling the TrainerCallbackTest obj's underlying member method code with example usage: obj.check_callbacks_equality(cbs1, cbs2) without return types