code: def _active_cli(self):
          
          cli = self.cli
  
          # If there is a sub CLI. That one is always active.
          while cli._sub_cli:
              cli = cli._sub_cli
  
          return cli
docs: Return the active `CommandLineInterface`.