code: def request_pdu(self):
          
          if None in [self.address, self.value]:
              # TODO Raise proper exception.
              raise Exception
  
          return struct.pack('>BHH', self.function_code, self.address,
                             self._value)
docs: Build request PDU to write single coil.
  
          :return: Byte array of 5 bytes with PDU.