<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_object(self, base_: Type, qualifier: str = None) -> Any: """ Get instance directly from the container. If the qualifier is not None, proper method to create/retrieve instance is used. :param base_: `base` of this object :param qualifier: optional qualifier :return: object instance """

        egg_ = self._find_egg(base_, qualifier)
        if egg_ is None:
            raise UnknownDependency('Unknown dependency %s' % base_)

        scope_id = getattr(egg_.egg, '__haps_custom_scope', INSTANCE_SCOPE)

        try:
            _scope = self.scopes[scope_id]
        except KeyError:
            raise UnknownScope('Unknown scopes with id %s' % scope_id)
        else:
            with self._lock:
                return _scope.get_object(egg_.egg)