docs: def _glob_events_files(self, paths, recursive):
      """Find all tf events files under a list of paths recursively. """
  
      event_files = []
      for path in paths:
        dirs = tf.gfile.Glob(path)
        dirs = filter(lambda x: tf.gfile.IsDirectory(x), dirs)
        for dir in dirs:
          if recursive:
            dir_files_pair = [(root, filenames) for root, _, filenames in tf.gfile.Walk(dir)]
          else:
            dir_files_pair = [(dir, tf.gfile.ListDirectory(dir))]
  
          for root, filenames in dir_files_pair:
            file_names = fnmatch.filter(filenames, '*.tfevents.*')
            file_paths = [os.path.join(root, x) for x in file_names]
            file_paths = filter(lambda x: not tf.gfile.IsDirectory(x), file_paths)
            event_files += file_paths
      return event_files