code: def test_maxiter(
      self,
      desired_class,
      sample_custom_query_2,
      total_CFs,
      initialization,
      maxiterations,
  ):
      ans = self.exp.generate_counterfactuals(
          query_instances=sample_custom_query_2,
          total_CFs=total_CFs,
          desired_class=desired_class,
          initialization=initialization,
          maxiterations=maxiterations,
      )
      for cfs_example in ans.cf_examples_list:
          for i in cfs_example.final_cfs_df[
              self.exp.data_interface.outcome_name
          ].values:
              assert i == desired_class
  
imports: import pytest
  import sklearn
  from raiutils.exceptions import UserConfigValidationException
  import dice_ml
  from dice_ml.utils import helpers
  from dice_ml.utils.neuralnetworks import MulticlassNetwork
label_desc: Use image node_id 8 for calling the TestDiceGeneticBinaryClassificationMethods obj's underlying member method code with example usage: obj.test_maxiter(desired_class, sample_custom_query_2, total_CFs, initialization, maxiterations) without return types