<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _cls_fqn(self, cls):
 """ Returns fully qualified name for the class based on current namespace and the class name. """

        ns = self._namespace_stack[-1]
        if ns in ['__base__', None]:
            return cls.__name__
        else:
            return ns + '.' + cls.__name__