Writes via a data :class:`Provider` the :class:`Field` values of
        the given *item* to the `data source`.

        :param Provider provider: data :class:`Provider`.
        :param item: item to write.
        :param byte_order: encoding :class:`Byteorder`.
        :type byte_order: :class:`Byteorder`, :class:`str`

def write_to(self, provider, item, byte_order=BYTEORDER):
        """ Writes via a data :class:`Provider` the :class:`Field` values of
        the given *item* to the `data source`.

        :param Provider provider: data :class:`Provider`.
        :param item: item to write.
        :param byte_order: encoding :class:`Byteorder`.
        :type byte_order: :class:`Byteorder`, :class:`str`
        """
        # Create memory patch for the item to write
        patch = self.patch(item, byte_order)

        if patch is None:
            pass
        elif is_provider(provider):
            if patch.inject:
                # Unpatched content of the memory area in the data source to modify
                content = provider.read(patch.address, len(patch.buffer))

                # Decimal value of the memory area to patch
                value = int.from_bytes(content, byte_order.value)

                # Inject memory patch content
                bit_mask = ~((2 ** patch.bit_size - 1) << patch.bit_offset)
                bit_mask &= (2 ** (len(patch.buffer) * 8) - 1)
                value &= bit_mask
                value |= int.from_bytes(patch.buffer, byte_order.value)

                # Patched content for the memory area in the data source
                buffer = value.to_bytes(len(patch.buffer), byte_order.value)

                provider.write(buffer, patch.address, len(buffer))
            else:
                provider.write(patch.buffer, patch.address, len(patch.buffer))
        else:
            raise ProviderTypeError(self, provider)