<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_defaults(self, ctype: ContentType = None) -> "InstanceNode": """Return the receiver with defaults added recursively to its value. Args: ctype: Content type of the defaults to be added. If it is ``None``, the content type will be the same as receiver's. """

        val = self.value
        if not (isinstance(val, StructuredValue) and self.is_internal()):
            return self
        res = self
        if isinstance(val, ObjectValue):
            if val:
                for mn in self._member_names():
                    m = res._member(mn) if res is self else res.sibling(mn)
                    res = m.add_defaults(ctype)
                res = res.up()
            return self.schema_node._add_defaults(res, ctype)
        if not val:
            return res
        en = res[0]
        while True:
            res = en.add_defaults(ctype)
            try:
                en = res.next()
            except NonexistentInstance:
                break
        return res.up()