docs: def create_response_pdu(self, data):
          """ Create response pdu.
  
          :param data: A list with 0's and/or 1's.
          :return: Byte array of at least 3 bytes.
          """
          log.debug('Create single bit response pdu {0}.'.format(data))
          bytes_ = [data[i:i + 8] for i in range(0, len(data), 8)]
  
          # Reduce each all bits per byte to a number. Byte
          # [0, 0, 0, 0, 0, 1, 1, 1] is intepreted as binary en is decimal 3.
          for index, byte in enumerate(bytes_):
              bytes_[index] = \
                  reduce(lambda a, b: (a << 1) + b, list(reversed(byte)))
  
          log.debug('Reduced single bit data to {0}.'.format(bytes_))
          # The first 2 B's of the format encode the function code (1 byte) and
          # the length (1 byte) of the following byte series. Followed by # a B
          # for every byte in the series of bytes. 3 lead to the format '>BBB'
          # and 257 lead to the format '>BBBB'.
          fmt = '>BB' + self.format_character * len(bytes_)
          return struct.pack(fmt, self.function_code, len(bytes_), *bytes_)