code: def enter_cli_mode(self):
          
          delay_factor = self.select_delay_factor(delay_factor=0)
          count = 0
          cur_prompt = ""
          while count < 50:
              self.write_channel(self.RETURN)
              time.sleep(0.1 * delay_factor)
              cur_prompt = self.read_channel()
              if re.search(r"admin@", cur_prompt) or re.search(
                  r"^\$$", cur_prompt.strip()
              ):
                  self.write_channel("cli" + self.RETURN)
                  time.sleep(0.3 * delay_factor)
                  self.clear_buffer()
                  break
              elif ">" in cur_prompt or "%" in cur_prompt:
                  break
              count += 1
docs: Check if at shell prompt root@ and go into CLI.