class_docstr: A test for SAM.
code: def test_sam(self):
      optimizer = SAM(
          self.model.parameters(),
          self.base_optimizer,
          lr=0.1,
          momentum=0.9,
      )
      self.assertEqual(
          optimizer.base_optimizer.__class__, torch.optim.SGD
      )
  
imports: import unittest
  import torch
  import torchvision
  from towhee.models.layers.sam import SAM
label_desc: Use image node_id 2 for calling the TestOperator obj's underlying member method code with example usage: obj.test_sam() without return types