class_docstr: Attacks a model with word substiutitions using a genetic algorithm.
  
  Args:
      pop_size (int): The population size. Defaults to 60.
      max_iters (int): The maximum number of iterations to use. Defaults to 20.
      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.
docstr: Modify `pop_member` by returning a new copy with `new_text`,
  `new_result`, and `num_candidate_transformations` altered appropriately
  for given `word_idx`
code: def _modify_population_member(
      self, pop_member, new_text, new_result, word_idx
  ):
      """Modify `pop_member` by returning a new copy with `new_text`,
      `new_result`, and `num_candidate_transformations` altered appropriately
      for given `word_idx`"""
      num_candidate_transformations = np.copy(
          pop_member.attributes["num_candidate_transformations"]
      )
      num_candidate_transformations[word_idx] = 0
      return PopulationMember(
          new_text,
          result=new_result,
          attributes={
              "num_candidate_transformations": num_candidate_transformations
          },
      )
  
file_path: TextAttack/textattack/search_methods/alzantot_genetic_algorithm.py
imports: import numpy
  from textattack.search_methods import GeneticAlgorithm, PopulationMember
label_desc: Use image node_id 2 for calling the AlzantotGeneticAlgorithm obj's underlying member method code with example usage: obj._modify_population_member(pop_member, new_text, new_result, word_idx) and returns: PopulationMember