docs: def collect_files(dirpath, cond=lambda fullname: True):
      """
      Recursively collect the files contained inside dirpath.
  
      :param dirpath: path to a readable directory
      :param cond: condition on the path to collect the file
      """
      files = []
      for fname in os.listdir(dirpath):
          fullname = os.path.join(dirpath, fname)
          if os.path.isdir(fullname):  # navigate inside
              files.extend(collect_files(fullname))
          else:  # collect files
              if cond(fullname):
                  files.append(fullname)
      return files