code: def check_kernels(net, mode):
      # Check the Encoder blocks
      for layer_num, res_block in enumerate(net.res_blocks):
          for inner_num, layer in enumerate(res_block.layers):
              if layer_num > 0 and inner_num == 0:
                  sz = 2
              else:
                  sz = 1
  
              if (
                  layer.layers.conv1.kernel_size != (1, 1)
                  or layer.layers.conv2.kernel_size != (3, 3)
                  or layer.layers.conv3.kernel_size != (1, 1)
              ):
                  return True
  
              if (
                  layer.layers.conv1.stride != (1, 1)
                  or layer.layers.conv2.stride != (sz, sz)
                  or layer.layers.conv3.stride != (1, 1)
              ):
                  return True
  
          sz2 = 1
          if layer_num > 0:
              sz2 = 2
          if res_block.shortcut.kernel_size != (
              1,
              1,
          ) or res_block.shortcut.stride != (sz2, sz2):
              return True
  
      if net.bottleneck.conv_bottleneck.kernel_size != (
          1,
          1,
      ) or net.bottleneck.conv_bottleneck.stride != (1, 1):
          return True
  
      # Check HV Branch
      if check_branch(net.horizontal_vertical.decoder_blocks, mode):
          return True
      if check_output(net.horizontal_vertical.output_features, mode):
          return True
  
      # Check NP Branch
      if check_branch(net.nucleus_prediction.decoder_blocks, mode):
          return True
      if check_output(net.nucleus_prediction.output_features, mode):
          return True
  
      # Check NC Branch
      if check_branch(net.type_prediction.decoder_blocks, mode):
          return True
      if check_output(net.type_prediction.output_features, mode):
          return True
  
      return False
  
file_path: MONAI/tests/test_hovernet.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.networks import eval_mode, train_mode
  from monai.networks.nets import HoVerNet
  from monai.networks.nets.hovernet import _DenseLayerDecoder
  from tests.utils import test_script_save
label_desc: Use image node_id 3 for calling a global function with example usage: check_kernels(net, mode) and returns: False, True, True, True, True, True, True, True, True, True, True