docstr: Test early stopping with ftol and ftol_iter;
  must run for a minimum of ftol_iter iterations
docstr_tok: ["Test","early","stopping","with","ftol","and","ftol_iter",";","must","run","for","a","minimum","of","ftol_iter","iterations"]
code: def test_ftol_iter_effect(self, optimizer):
      """Test early stopping with ftol and ftol_iter;
      must run for a minimum of ftol_iter iterations"""
      optm, params = optimizer
      params["ftol_iter"] = 50
      opt = optm(**params)
      opt.optimize(objective_function, iters=iterations, **kwargs)
      assert len(opt.cost_history) >= opt.ftol_iter
  
file_path: pyswarms/tests/optimizers/test_tolerance.py
imports: import pytest
  import random
  import numpy
  from pyswarms.backend.topology import Star
  from pyswarms.single import GlobalBestPSO, LocalBestPSO, GeneralOptimizerPSO
label_desc: Use image node_id 5 for calling the TestToleranceOptions obj's underlying member method code with example usage: obj.test_ftol_iter_effect(optimizer) without return types