def testOverWriteRetainOriginalImageAdditionalChannels(self):
    """Tests that keyword arguments are applied correctly."""
    original_retain_original_image_additional_channels = True
    desired_retain_original_image_additional_channels = False

    pipeline_config_path = os.path.join(self.get_temp_dir(), "pipeline.config")
    pipeline_config = pipeline_pb2.TrainEvalPipelineConfig()
    pipeline_config.eval_config.retain_original_image_additional_channels = (
        original_retain_original_image_additional_channels)
    _write_config(pipeline_config, pipeline_config_path)

    configs = config_util.get_configs_from_pipeline_file(pipeline_config_path)
    override_dict = {
        "retain_original_image_additional_channels_in_eval":
            desired_retain_original_image_additional_channels
    }
    configs = config_util.merge_external_params_with_configs(
        configs, kwargs_dict=override_dict)
    retain_original_image_additional_channels = configs[
        "eval_config"].retain_original_image_additional_channels
    self.assertEqual(desired_retain_original_image_additional_channels,
                     retain_original_image_additional_channels)
Tests that keyword arguments are applied correctly.
inference_api/src/main/object_detection/utils/config_util_test.py