code: def apply_test_time_pool(model, config, use_test_size=False):
      test_time_pool = False
      if not hasattr(model, "default_cfg") or not model.default_cfg:
          return model, False
      if use_test_size and "test_input_size" in model.default_cfg:
          df_input_size = model.default_cfg["test_input_size"]
      else:
          df_input_size = model.default_cfg["input_size"]
      if (
          config["input_size"][-1] > df_input_size[-1]
          and config["input_size"][-2] > df_input_size[-2]
      ):
          _logger.info(
              "Target input size %s > pretrained default %s, using test time pooling"
              % (
                  str(config["input_size"][-2:]),
                  str(df_input_size[-2:]),
              )
          )
          model = TestTimePoolHead(
              model, original_pool=model.default_cfg["pool_size"]
          )
          test_time_pool = True
      return model, test_time_pool
  
file_path: pytorch-image-models/timm/layers/test_time_pool.py
imports: import logging
  from torch import nn
  import torch.nn.functional
  from .adaptive_avgmax_pool import adaptive_avgmax_pool2d
label_desc: Use image node_id 1 for calling a global function with example usage: apply_test_time_pool(model, config, use_test_size) and returns: model,  test_time_pool, model,  False