def __init__(self, parent, offset=<NUM_LIT:0>, perms=None, size=None, **kwargs):
assert isinstance(parent, Map)<EOL>assert offset >= <NUM_LIT:0> and offset < len(parent)<EOL>if size is None:<EOL><INDENT>size = len(parent) - offset<EOL><DEDENT>assert parent.start + offset + size <= parent.end<EOL>if perms is None:<EOL><INDENT>perms = parent.perms<EOL><DEDENT>super().__init__(parent.start + offset, size, perms, **kwargs)<EOL>self._parent = parent<EOL>self._parent.__setitem__ = False<EOL>self._cow = {}<EOL>
A copy on write copy of parent. Writes to the parent after a copy on
write are unspecified.

:param parent: the parent map.
:param offset: an offset within the parent map from where to create the new map.
:param perms: Permissions on new mapping, or None if inheriting.
:param size: the size of the new map or max.