def _fix_namespace(self):
if self.namespace is not None:<EOL><INDENT>return self<EOL><DEDENT>namespace = namespace_manager.get_namespace()<EOL>return self.__class__(kind=self.kind, ancestor=self.ancestor,<EOL>filters=self.filters, orders=self.orders,<EOL>app=self.app, namespace=namespace,<EOL>default_options=self.default_options,<EOL>projection=self.projection, group_by=self.group_by)<EOL>
Internal helper to fix the namespace.

        This is called to ensure that for queries without an explicit
        namespace, the namespace used by async calls is the one in effect
        at the time the async call is made, not the one in effect when the
        the request is actually generated.