code: def test_freeze_modules_based_on_opts() -> None:
      model = nn.Sequential(
          OrderedDict(
              [
                  ("conv1", nn.Conv2d(1, 20, 5)),
                  ("relu1", nn.ReLU()),
                  ("conv2", nn.Conv2d(20, 64, 5)),
                  ("relu2", nn.ReLU()),
              ]
          )
      )
      opts = argparse.Namespace(**{"model.freeze_modules": "conv1"})
      freeze_modules_based_on_opts(opts, model)
  
      model.train()
      assert model.conv1.training == False
      assert model.conv2.training == True
      assert model.relu1.training == True
  
imports: import argparse
  from collections import OrderedDict
  import torch
  import torch.nn
  from cvnets.misc.common import freeze_modules_based_on_opts, get_tensor_sizes
label_desc: Use image node_id 1 for calling a global function with example usage: test_freeze_modules_based_on_opts() without return types