code: def get_external_commands(self):
          
          res = self.external_commands
          logger.debug("Get and clear external commands list: %s", res)
          self.external_commands = []
          return res
docs: Get the external commands
  
          :return: External commands list
          :rtype: list