async def METHOD_NAME(self, channel, gain):
    if (channel, gain) not in (("A", 128), ("B", 32), ("A", 64)):
        raise HX711Error("HX711 does not support a combination of channel {} and gain {}"
                         .format(channel, gain))
    self._channel = channel
    self._gain    = gain
    self._log("set channel=%s gain=%d", channel, gain)
    await self.sample() # dummy sample to prime the settings