<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, start_position: int, size: int, value: bytes) -> None: """ Write `value` into memory. """

        if size:
            validate_uint256(start_position)
            validate_uint256(size)
            validate_is_bytes(value)
            validate_length(value, length=size)
            validate_lte(start_position + size, maximum=len(self))

            for idx, v in enumerate(value):
                self._bytes[start_position + idx] = v