def METHOD_NAME(self):
    if self.config["list"]:
        for name in self.context.layers:
            yield 0, (name,)
    else:
        # Choose the most recently added layer that isn't virtual
        if not self.config["layers"]:
            self.config["layers"] = []
            for name in self.context.layers:
                if not self.context.layers[name].metadata.get("mapped", False):
                    self.config["layers"] = [name]
        for name in self.config["layers"]:
            # Check the layer exists and validate the output file
            if name not in self.context.layers:
                yield 0, (f"Layer Name {name} does not exist",)
            else:
                output_name = self.config.get("output", ".".join([name, "raw"]))
                try:
                    file_handle = self.write_layer(
                        self.context,
                        name,
                        output_name,
                        self.open,
                        self.config.get("block_size", self.default_block_size),
                        progress_callback=self._progress_callback,
                    )
                    file_handle.close()
                except IOError as excp:
                    yield 0, (
                        f"Layer cannot be written to {self.config['output_name']}: {excp}",
                    )
                yield 0, (f"Layer has been written to {output_name}",)