code: def objective_function(X, **kwargs):
      """Objective function with arguments"""
      n_particles_ = X.shape[0]
      dist = [
          get_particle_obj(X[i], **kwargs) for i in range(n_particles_)
      ]
      return np.array(dist)
  
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 2 for calling a global function with example usage: objective_function(X) and returns: np