def METHOD_NAME(self, output_channels):
    if output_channels not in [1, 3]:
        raise ValueError(
            "Received invalid argument output_channels. "
            f"output_channels must be in 1 or 3. Got {output_channels}"
        )
    self.output_channels = output_channels