<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def doc_string(cls):
 """Get the doc string of this class. If this class does not have a doc string or the doc string is empty, try its base classes until the root base class, _ShellBase, is reached. CAVEAT: This method assumes that this class and all its super classes are derived from _ShellBase or object. """

        clz = cls
        while not clz.__doc__:
            clz = clz.__bases__[0]
        return clz.__doc__