code: def test_log_file_verbosity_2():
      """Set verbosity as 2. Assert log_file parameter to generate log file."""
      cachedir = mkdtemp()
      file_name = cachedir + "progress_verbose_2.log"
      tracking_progress_file = open(file_name, "w")
      tpot_obj = TPOTClassifier(
          population_size=POP_SIZE,
          generations=GEN_SIZE,
          verbosity=2,
          log_file=tracking_progress_file,
      )
      tpot_obj.fit(X, y)
      assert_equal(os.path.getsize(file_name) > 0, True)
      check_generations(file_name, GEN_SIZE)
      rmtree(cachedir)
  
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 2 for calling a global function with example usage: test_log_file_verbosity_2() without return types