code: def test_mobilenet_optimize_for_mobile(self):
      m = torchvision.models.mobilenet_v3_small()
      m = torch.jit.script(m)
      m = optimize_for_mobile(m)
  
      # run forward 3 times until segfault, see https://github.com/pytorch/pytorch/issues/52463
      x = torch.zeros(1, 3, 56, 56)
      self.assertEqual(m(x).numel(), 1000)
      self.assertEqual(m(x).numel(), 1000)
      self.assertEqual(m(x).numel(), 1000)
  
file_path: pytorch/test/test_mobile_optimizer.py
imports: import unittest
  import torch
  import torch.nn
  import torch.utils.bundled_inputs
  from torch.testing._internal.common_utils import TestCase, run_tests, skipIfNoXNNPACK
  from torch.testing._internal.jit_utils import get_forward, get_forward_graph
  from torch.utils.mobile_optimizer import LintCode, generate_mobile_module_lints, optimize_for_mobile, MobileOptimizerType
  from torch.nn import functional
  from torch.testing._internal.common_quantized import override_quantized_engine
label_desc: Use image node_id 6 for calling the TestOptimizer obj's underlying member method code with example usage: obj.test_mobilenet_optimize_for_mobile() without return types