class_docstr: A PSO class, inherited from Optimizer.
  
  This is the designed class to define PSO-related
  variables and methods.
  
  References:
      J. Kennedy, R. C. Eberhart and Y. Shi. Swarm intelligence.
      Artificial Intelligence (2001).
class_docstr_tok: ["A","PSO","class",",","inherited","from","Optimizer",".","This","is","the","designed","class","to","define","PSO-related","variables","and","methods",".","References",":","J.","Kennedy",",","R.","C.","Eberhart","and","Y.","Shi",".","Swarm","intelligence",".","Artificial","Intelligence","(","2001",")","."]
code: def local_position(self, local_position: np.ndarray) -> None:
      if not isinstance(local_position, np.ndarray):
          raise e.TypeError("`local_position` should be a numpy array")
  
      self._local_position = local_position
  
imports: import copy
  import time
  from typing import Any, Dict, List, Optional
  import numpy
  import opytimizer.math.random
  import opytimizer.utils.constant
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.function import Function
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 9 for calling the PSO obj's underlying member method code with example usage: obj.local_position(local_position) without return types