code: def _recursive_get_all_file_names(dir):
      
      if not dir:
          return []
  
      result = []
      for basedir, dirs, files in os.walk(dir):
          result.extend(files)
  
      return result
docs: Get all the file names in the directory. Gets all the top level file names
      only, not the full path.
  
      dir: a directory or string, as to hand to os.walk(). If None, returns empty
          list.