code: def get_file_list(path, max_depth=1, cur_depth=0):
      
      if os.path.exists(path):
          for name in os.listdir(path):
              if name.startswith('.'):
                  continue
              
              full_path = os.path.join(path, name)
              if os.path.isdir(full_path):
                  if cur_depth == max_depth:
                      continue
                  
                  file_list = get_file_list(full_path, max_depth, cur_depth + 1)
                  for result in file_list:
                      yield result
              else:
                  yield full_path
docs: Recursively returns a list of all files up to ``max_depth``
      in a directory.