<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put_member(self, name: InstanceName, value: Value, raw: bool = False) -> "InstanceNode": """Return receiver's member with a new value. If the member is permitted by the schema but doesn't exist, it is created. Args: name: Instance name of the member. value: New value of the member. raw: Flag to be set if `value` is raw. Raises: NonexistentSchemaNode: If member `name` is not permitted by the schema. InstanceValueError: If the receiver's value is not an object. """

        if not isinstance(self.value, ObjectValue):
            raise InstanceValueError(self.json_pointer(), "member of non-object")
        csn = self._member_schema_node(name)
        newval = self.value.copy()
        newval[name] = csn.from_raw(value, self.json_pointer()) if raw else value
        return self._copy(newval)._member(name)