code: def walk(self, action, user_data=None):
          
          action(self.index_file, self.__root, 0, user_data)
          self.__do_walk(self.__root, 1, action, user_data)
docs: Walk the hierarchy, applying action to each filename.
  
          Args:
              action: callable, the callable to invoke for each filename,
                  will be invoked with the filename, the subfiles, and
                  the level in the sitemap.