code: def _check_num_and_type_of_observers(self, model, num_observers):
      qconfig_dict = {"": default_dynamic_qconfig}
      scripted_model = OnDevicePTQUtils.insert_observers(
          model, qconfig_dict
      )
      observer_modules = OnDevicePTQUtils.find_observer_modules(
          scripted_model
      )
      self.assertTrue(len(observer_modules) == num_observers)
      for observer in observer_modules:
          self.assertTrue(observer.original_name == "MinMaxObserver")
  
      qconfig_dict = {"": per_channel_dynamic_qconfig}
      scripted_model = OnDevicePTQUtils.insert_observers(
          model, qconfig_dict
      )
      observer_modules = OnDevicePTQUtils.find_observer_modules(
          scripted_model
      )
      self.assertTrue(len(observer_modules) == num_observers)
      for observer in observer_modules:
          self.assertTrue(
              observer.original_name == "PerChannelMinMaxObserver"
          )
  
imports: import torch
  import torch._C
  from torch.ao.quantization import default_dynamic_qconfig, per_channel_dynamic_qconfig
  from torch.ao.quantization.quantize_jit import prepare_dynamic_jit, convert_dynamic_jit, _prepare_ondevice_dynamic_jit, _quantize_ondevice_dynamic_jit
  from torch.testing._internal.common_utils import TestCase
  from torch.testing._internal.common_quantization import get_script_module, LinearAddModel
  from torch.jit.mobile import _load_for_lite_interpreter, LiteScriptModule
  from torch.testing import FileCheck
  from torch.utils import bundled_inputs
  import io
  from typing import Dict
label_desc: Use image node_id 1 for calling the TestOnDeviceDynamicPTQInsertObservers obj's underlying member method code with example usage: obj._check_num_and_type_of_observers(model, num_observers) without return types