code: def check_generations(file_name, generations):
      """Assert generation log message is present in log_file."""
      with open(file_name, "r") as file:
          file_text = file.read()
      for gen in range(generations):
          assert_true(
              re.search(
                  "Generation {0} - .+".format(gen + 1), file_text
              )
          )
  
file_path: tpot/tests/test_log_file.py
imports: from tpot import TPOTClassifier
  from sklearn.datasets import load_iris
  from nose.tools import assert_equal, assert_true
  import os
  import re
  from tempfile import mkdtemp
  from shutil import rmtree
label_desc: Use image node_id 4 for calling a global function with example usage: check_generations(file_name, generations) without return types