code: def update_config_mode(self, prompt):  # pylint: disable=no-self-use
          
          mode = 'global'
          if prompt:
              if 'config' in prompt:
                  mode = 'config'
              elif 'admin' in prompt:
                  mode = 'admin'
  
          self.log("Mode: {}".format(mode))
          return mode
docs: Update config mode based on the prompt analysis.