code: def get_config(project_path):
      def get_config(
          model_name: str | None = None,
          config_path: str | None = None,
          weight_file: str | None = None,
      ):
          """Gets config for testing."""
          config = get_configurable_parameters(
              model_name, config_path, weight_file
          )
          config.dataset.image_size = (100, 100)
          config.model.input_size = (100, 100)
          config.project.path = project_path
          config.trainer.max_epochs = 1
          config.trainer.check_val_every_n_epoch = 1
          config.trainer.limit_train_batches = 1
          config.trainer.limit_predict_batches = 1
          return config
  
      yield get_config
  
file_path: anomalib/tests/pre_merge/tools/conftest.py
imports: from __future__ import annotations
  from tempfile import TemporaryDirectory
  from typing import Generator
  import albumentations
  import cv2
  import numpy
  import pytest
  from albumentations.pytorch import ToTensorV2
  from anomalib.config import get_configurable_parameters
label_desc: Use image node_id 2 for calling a global function with example usage: get_config(project_path) and returns: config