class_docstr: Version of ArrayStepShared that allows samplers to access the states
  of other chains in the population.
  
  Works by linking a list of Points that is updated as the chains are iterated.
class_docstr_tok: ["Version","of","ArrayStepShared","that","allows","samplers","to","access","the","states","of","other","chains","in","the","population",".","Works","by","linking","a","list","of","Points","that","is","updated","as","the","chains","are","iterated","."]
docstr: Links the sampler to the population.
  
  Parameters
  ----------
  population: list of Points. (The elements of this list must be
      replaced with current chain states in every iteration.)
  chain_index: int of the index of this sampler in the population
docstr_tok: ["Links","the","sampler","to","the","population",".","Parameters","--","--","--","--","--","population",":","list","of","Points",".","(","The","elements","of","this","list","must","be","replaced","with","current","chain","states","in","every","iteration",".",")","chain_index",":","int","of","the","index","of","this","sampler","in","the","population"]
code: def link_population(self, population, chain_index):
      """Links the sampler to the population.
  
      Parameters
      ----------
      population: list of Points. (The elements of this list must be
          replaced with current chain states in every iteration.)
      chain_index: int of the index of this sampler in the population
      """
      self.population = population
      self.this_chain = chain_index
      self.other_chains = [
          c for c in range(len(population)) if c != chain_index
      ]
      if not len(self.other_chains) > 1:
          raise ValueError(
              f"Population is just {self.this_chain} + {self.other_chains}. "
              "This is too small and the error should have been raised earlier."
          )
      return
  
imports: from abc import abstractmethod
  from typing import Callable, List, Tuple, Union, cast
  import numpy
  from numpy.random import uniform
  from pymc.blocking import DictToArrayBijection, PointType, RaveledVars, StatsType
  from pymc.model import modelcontext
  from pymc.step_methods.compound import BlockedStep
  from pymc.util import get_var_name
label_desc: Use image node_id 2 for calling the PopulationArrayStepShared obj's underlying member method code with example usage: obj.link_population(population, chain_index) without return types