code: def test_build_optimizer_custom_model(self):
      model = MMBT.from_params()
      model.build()
      self.config.model = model.config.model
      self.config.model_config = model.config
  
      optimizer = build_optimizer(model, self.config)
      self.assertTrue(isinstance(optimizer, torch.optim.Optimizer))
      self.assertEqual(len(optimizer.param_groups), 2)
  
file_path: mmf/tests/modules/test_optimizers.py
imports: import gc
  import unittest
  import torch
  from mmf.models.mmbt import MMBT
  from mmf.modules.hf_layers import undo_replace_with_jit
  from mmf.utils.build import build_optimizer
  from omegaconf import OmegaConf
  from tests.test_utils import SimpleModel, skip_if_no_network
label_desc: Use image node_id 4 for calling the TestOptimizers obj's underlying member method code with example usage: obj.test_build_optimizer_custom_model() without return types