class_docstr: Test layer freezer
code: def test_freezer_by_idx(self):
      self.freezer.by_idx([0, -1])
      res1 = self.freezer.status(0)
      res2 = self.freezer.status(-1)
      self.assertEqual(
          res1 + res2, ["frozen" for _ in range(len(res1 + res2))]
      )
  
      self.freezer.by_idx([0, -1], freeze=False)
      res1 = self.freezer.status(0)
      res2 = self.freezer.status(-1)
      self.assertEqual(
          res1 + res2, ["unfrozen" for _ in range(len(res1 + res2))]
      )
  
file_path: towhee/tests/unittests/trainer/test_freezer.py
imports: import unittest
  import torchvision
  from towhee.trainer.utils.layer_freezer import LayerFreezer
label_desc: Use image node_id 3 for calling the TestFreezer obj's underlying member method code with example usage: obj.test_freezer_by_idx() without return types