code: def bestmove(self):
          
          self.go()
          last_info = ""
          while True:
              text = self.stdout.readline().strip()
              split_text = text.split(' ')
              print(text)
              if split_text[0] == "info":
                  last_info = Engine._bestmove_get_info(text)
              if split_text[0] == "bestmove":
                  ponder = None if len(split_text[0]) < 3 else split_text[3]
                  return {'move': split_text[1],
                          'ponder': ponder,
                          'info': last_info}
docs: Get proposed best move for current position.
  
          @return: dictionary with 'move', 'ponder', 'info' containing best move's UCI notation,
          ponder value and info dictionary.