docs: def channels_to_byte(self, channels):
          """
          :return: int
          """
          # pylint: disable-msg=R0201
          assert isinstance(channels, list)
          result = 0
          for offset in range(0, 8):
              if offset + 1 in channels:
                  result = result + (1 << offset)
          return result