code: def get_log_files(log_dir, name_filter="", log_file=_LOG_FILE):
      """Get all log files in directory containing subdirs of trained models."""
      names = [
          n for n in sorted(pathmgr.ls(log_dir)) if name_filter in n
      ]
      files = [os.path.join(log_dir, n, log_file) for n in names]
      f_n_ps = [
          (f, n) for (f, n) in zip(files, names) if pathmgr.exists(f)
      ]
      files, names = zip(*f_n_ps) if f_n_ps else ([], [])
      return files, names
  
file_path: pycls/pycls/core/logging.py
imports: import builtins
  import decimal
  import logging
  import os
  import sys
  import pycls.core.distributed
  import simplejson
  from pycls.core.config import cfg
  from pycls.core.io import pathmgr
label_desc: Use image node_id 6 for calling a global function with example usage: get_log_files(log_dir, name_filter, log_file) and returns: files,  names