code: def count_ensembler_iterations(self) -> int:
      iterations = []
  
      # One thing is to call phynisher, the other is to actually execute the funciton
      iterations_from_inside_ensemble_builder = []
      for line in self.lines:
          # Pynisher call
          # we have to count the start msg from pynisher
          # and the return msg
          # We expect the start msg to be something like:
          # [DEBUG] [2020-11-26 19:22:42,160:EnsembleBuilder] \
          # Function called with argument: (61....
          # [DEBUG] [2020-11-30 11:53:47,069:EnsembleBuilder] \
          # Function called with argument: (28.246965646743774, 1, False), {}
          match = re.search(
              r"EnsembleBuilder]\s+Function called with argument:\s+\(\d+\.\d+, (\d+), \w+",  # noqa: E501
              line,
          )
          if match:
              iterations.append(int(match.group(1)))
  
          # Ensemble Builder actual call
          # Here we expect the msg:
          # [DEBUG] [2020-11-30 11:53:14,877:EnsembleBuilder] Starting iteration 0,
          # time left: 61.266255
          # [DEBUG] [2020-11-27 20:27:28,044:EnsembleBuilder] Starting iteration 2,
          # time left: 10.603252
          match = re.search(
              r"EnsembleBuilder]\s+Starting iteration (\d+)", line
          )
          if match:
              iterations_from_inside_ensemble_builder.append(
                  int(match.group(1))
              )
  
          # The ensemble builder might not be called if there is no time.
          # Here we expect the msg:
          # [DEBUG] [2020-11-27 20:27:28,044:EnsembleBuilder] \
          #   Not starting iteration 2, as time left: 1.59324
          match = re.search(
              r"EnsembleBuilder]\s+Not starting iteration (\d+)", line
          )
          if match:
              iterations_from_inside_ensemble_builder.append(
                  int(match.group(1))
              )
  
      assert (
          iterations == iterations_from_inside_ensemble_builder
      ), "{} ! {}".format(
          iterations, iterations_from_inside_ensemble_builder
      )
  
      return iterations
  
file_path: auto-sklearn/test/test_automl/automl_utils.py
imports: import typing
  import glob
  import os
  import re
  import numpy
label_desc: Use image node_id 3 for calling the AutoMLLogParser obj's underlying member method code with example usage: obj.count_ensembler_iterations() and returns: iterations