code: def point_mutation(self, random_state):
          
          program = copy(self.program)
  
          # Get the nodes to modify
          mutate = np.where(random_state.uniform(size=len(program)) <
                            self.p_point_replace)[0]
  
          for node in mutate:
              if isinstance(program[node], _Function):
                  arity = program[node].arity
                  # Find a valid replacement with same arity
                  replacement = len(self.arities[arity])
                  replacement = random_state.randint(replacement)
                  replacement = self.arities[arity][replacement]
                  program[node] = replacement
              else:
                  # We've got a terminal, add a const or variable
                  if self.const_range is not None:
                      terminal = random_state.randint(self.n_features + 1)
                  else:
                      terminal = random_state.randint(self.n_features)
                  if terminal == self.n_features:
                      terminal = random_state.uniform(*self.const_range)
                      if self.const_range is None:
                          # We should never get here
                          raise ValueError('A constant was produced with '
                                           'const_range=None.')
                  program[node] = terminal
  
          return program, list(mutate)
docs: Perform the point mutation operation on the program.
  
          Point mutation selects random nodes from the embedded program to be
          replaced. Terminals are replaced by other terminals and functions are
          replaced by other functions that require the same number of arguments
          as the original node. The resulting tree forms an offspring.
  
          Parameters
          ----------
          random_state : RandomState instance
              The random number generator.
  
          Returns
          -------
          program : list
              The flattened tree representation of the program.