def output(self, context, *args, **kwargs):
        """
        Allow all readers to use eventually use output_fields XOR output_type options.

        """

        output_fields = self.output_fields
        output_type = self.output_type

        if output_fields and output_type:
            raise UnrecoverableError("Cannot specify both output_fields and output_type option.")

        if self.output_type:
            context.set_output_type(self.output_type)

        if self.output_fields:
            context.set_output_fields(self.output_fields)

        yield
Allow all readers to use eventually use output_fields XOR output_type options.