code: def run_console_rules(self, options_bootstrapper, goals, target_roots):
      
      subject = target_roots.specs
      console = Console()
      for goal in goals:
        goal_product = self.goal_map[goal]
        params = Params(subject, options_bootstrapper, console)
        logger.debug('requesting {} to satisfy execution of `{}` goal'.format(goal_product, goal))
        try:
          exit_code = self.scheduler_session.run_console_rule(goal_product, params)
        finally:
          console.flush()
  
        if exit_code != PANTS_SUCCEEDED_EXIT_CODE:
          return exit_code
      return PANTS_SUCCEEDED_EXIT_CODE
docs: Runs @console_rules sequentially and interactively by requesting their implicit Goal products.
  
      For retryable failures, raises scheduler.ExecutionError.
  
      :param list goals: The list of requested goal names as passed on the commandline.
      :param TargetRoots target_roots: The targets root of the request.
  
      :returns: An exit code.