code: def test_num_channels_from_checkpoint(self, input_shape):
      # Create a model and save it to a checkpoint. Then test whether we can
      # detect its number of channels correctly.
      weights_ckpt_path = _filepath_for_weights_ckpt_from_shape(
          input_shape
      )
  
      # Load it back and determine the num_channels.
      detected_num_channels = (
          keras_modeling.num_channels_from_checkpoint(weights_ckpt_path)
      )
      self.assertEqual(detected_num_channels, input_shape[-1])
  
imports: from typing import Tuple
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from deepvariant import dv_config
  from deepvariant import dv_constants
  from deepvariant import keras_modeling
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 4 for calling the KerasModelingTest obj's underlying member method code with example usage: obj.test_num_channels_from_checkpoint(input_shape) without return types