<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_wrapped_instance(self, instance=None):
 """Returns a wrapped model instance. """

        if instance._meta.label_lower not in self.registry:
            raise ModelNotRegistered(f"{repr(instance)} is not registered with {self}.")
        wrapper_cls = self.registry.get(instance._meta.label_lower) or self.wrapper_cls
        if wrapper_cls:
            return wrapper_cls(instance)
        return instance