class_docstr: Attacks a model with word substiutitions using a genetic algorithm.
  
  Args:
      pop_size (int): The population size. Defaults to 20.
      max_iters (int): The maximum number of iterations to use. Defaults to 50.
      temp (float): Temperature for softmax function used to normalize probability dist when sampling parents.
          Higher temperature increases the sensitivity to lower probability candidates.
      give_up_if_no_improvement (bool): If True, stop the search early if no candidate that improves the score is found.
      post_crossover_check (bool): If True, check if child produced from crossover step passes the constraints.
      max_crossover_retries (int): Maximum number of crossover retries if resulting child fails to pass the constraints.
          Applied only when `post_crossover_check` is set to `True`.
          Setting it to 0 means we immediately take one of the parents at random as the child upon failure.
      max_replace_times_per_index (int):  The maximum times words at the same index can be replaced in improved genetic algorithm.
docstr: Get the attribute of `pop_member` that is used for determining
  probability of each word being selected for perturbation.
code: def _get_word_select_prob_weights(self, pop_member):
      """Get the attribute of `pop_member` that is used for determining
      probability of each word being selected for perturbation."""
      return pop_member.attributes["num_replacements_left"]
  
file_path: TextAttack/textattack/search_methods/improved_genetic_algorithm.py
imports: import numpy
  from textattack.search_methods import GeneticAlgorithm, PopulationMember
label_desc: Use image node_id 3 for calling the ImprovedGeneticAlgorithm obj's underlying member method code with example usage: obj._get_word_select_prob_weights(pop_member) and returns: pop_member