code: def update_nncf_config(
      config: DictConfig | ListConfig,
  ) -> DictConfig | ListConfig:
      """Set the NNCF input size based on the value of the crop_size parameter in the configurable parameters object.
  
      Args
          config (DictConfig | ListConfig): Configurable parameters of the current run.
  
      Returns:
          DictConfig | ListConfig: Updated configurable parameters in DictConfig object.
      """
      crop_size = config.dataset.image_size
      sample_size = (
          (crop_size, crop_size)
          if isinstance(crop_size, int)
          else crop_size
      )
      if "optimization" in config.keys():
          if "nncf" in config.optimization.keys():
              if "input_info" not in config.optimization.nncf.keys():
                  config.optimization.nncf["input_info"] = {
                      "sample_size": None
                  }
              config.optimization.nncf.input_info.sample_size = [
                  1,
                  3,
                  *sample_size,
              ]
              if config.optimization.nncf.apply:
                  if "update_config" in config.optimization.nncf:
                      return OmegaConf.merge(
                          config, config.optimization.nncf.update_config
                      )
      return config
  
file_path: anomalib/src/anomalib/config/config.py
imports: from __future__ import annotations
  import time
  import warnings
  from datetime import datetime
  from pathlib import Path
  from warnings import warn
  from omegaconf import DictConfig, ListConfig, OmegaConf
  from anomalib.data.utils import TestSplitMode, ValSplitMode
label_desc: Use image node_id 3 for calling a global function with example usage: update_nncf_config(config) and returns: config, OmegaConf