code: def get_files_from_dir(dir_path):
      """
      Check if folder has files
      :param dir_path: |string| folder path
      :return: |list| return files in folder
      """
      start_time = time.time()
      entities = []
      while time.time() - start_time < Def.TimeOuts.wait_for_files:
          # wait until logs created
          if os.path.exists(dir_path):
              entities = os.listdir(dir_path)
              if len(entities) > 0:
                  break
          time.sleep(1)
  
      assert len(entities) > 0, Def.Consts.ASSERT_MSG.format(
          "num files > 0", len(entities)
      )
      return entities
  
file_path: coach/rl_coach/tests/utils/test_utils.py
imports: import glob
  import sys
  import time
  import os
  from os import path
  from rl_coach.tests.utils.definitions import Definitions
label_desc: Use image node_id 3 for calling a global function with example usage: get_files_from_dir(dir_path) and returns: entities