code: def _files_in_layers(self, layers, directory):
          
          files = {}
  
          for layer in layers:
              self.log.debug("Generating list of files in layer '%s'..." % layer)
              tar_file = os.path.join(directory, layer, "layer.tar")
              with tarfile.open(tar_file, 'r', format=tarfile.PAX_FORMAT) as tar:
                  files[layer] = [self._normalize_path(
                      x) for x in tar.getnames()]
              self.log.debug("Done, found %s files" % len(files[layer]))
  
          return files
docs: Prepare a list of files in all layers