code: def create_exception(self, code):
          
          frame = deepcopy(self)
          frame.length = 3
          frame.fcode += 0x80
          frame.data = bytearray(chr(code))
          return frame
docs: Create an exception frame based on this frame.
  
          :param code: Modbus exception code to use for this exception
          :return: ModbusTCPFrame instance that represents an exception