docstr: Optimize the swarm for a number of iterations
  
  Performs the optimization to evaluate the objective
  function :code:`objective_func` for a number of iterations
  :code:`iter.`
  
  Parameters
  ----------
  objective_func : callable
      objective function to be evaluated
  iters : int
      number of iterations
  n_processes : int
      number of processes to use for parallel particle evaluation
      Default is None with no parallelization
  kwargs : dict
      arguments for objective function
  
  Raises
  ------
  NotImplementedError
      When this method is not implemented.
code: def optimize(self, objective_func, iters, n_processes=None, **kwargs):
      """Optimize the swarm for a number of iterations
  
      Performs the optimization to evaluate the objective
      function :code:`objective_func` for a number of iterations
      :code:`iter.`
  
      Parameters
      ----------
      objective_func : callable
          objective function to be evaluated
      iters : int
          number of iterations
      n_processes : int
          number of processes to use for parallel particle evaluation
          Default is None with no parallelization
      kwargs : dict
          arguments for objective function
  
      Raises
      ------
      NotImplementedError
          When this method is not implemented.
      """
      raise NotImplementedError("SwarmBase::optimize()")
  
file_path: pyswarms/pyswarms/base/base_discrete.py
imports: import abc
  from collections import namedtuple
  import numpy
  from ..backend import create_swarm
label_desc: Use image node_id 3 for calling the DiscreteSwarmOptimizer obj's underlying member method code with example usage: obj.optimize(objective_func, iters, n_processes) without return types