code: def only_pretrain_models(path: str) -> bool:
      """
      Predicate for list_config_files allowing to list all files
      that are pre-training methods or models plugged in those methods
      """
      dir_path, _ = os.path.split(path)
      return dir_path.endswith("pretrain") or dir_path.endswith(
          "models"
      )
  
file_path: vissl/tests/utils.py
imports: import logging
  import os
  import re
  import sys
  from typing import Any, Callable, List
  import pkg_resources
  from omegaconf import OmegaConf
  from vissl.utils.hydra_config import compose_hydra_configuration
label_desc: Use image node_id 4 for calling a global function with example usage: only_pretrain_models(path) and returns: unknown