def METHOD_NAME(self, write_buffer: WriteBuffer):
    write_buffer.push_context("ModbusPDUReadCoilsResponse")
    # Implicit Field (byte_count) (Used for parsing, but its value is not stored as it's implicitly given by the objects content)
    byte_count: int = int(len(self.value))
    write_buffer.write_unsigned_byte(byte_count, logical_name="byteCount")
    # Array Field (value)
    write_buffer.write_byte_array(self.value, logical_name="value")
    write_buffer.pop_context("ModbusPDUReadCoilsResponse")