code: def mutInversion(individual):
      """Select two points (indices) in the individual, reverse the order of the
      attributes between these points [low, high] and return the mutated individual.
      This implementation allows for the length of the inversion to be 0 and 1,
      which would cause no change. This mutation is useful in situations where the
      order/adjacency of elements is important.
  
      :param individual: Individual to be mutated.
      :returns: A tuple of one individual.
  
      This function uses the :func:`~random.random` function from the python base
      :mod:`random` module.
      """
      size = len(individual)
      if size == 0:
          return (individual,)
  
      index_one = random.randrange(size)
      index_two = random.randrange(size)
      start_index = min(index_one, index_two)
      end_index = max(index_one, index_two)
  
      # Reverse the contents of the individual between the indices
      individual[start_index:end_index] = individual[
          start_index:end_index
      ][::-1]
  
      return (individual,)
  
file_path: deap/deap/tools/mutation.py
imports: import math
  import random
  from itertools import repeat
label_desc: Use image node_id 6 for calling a global function with example usage: mutInversion(individual) and returns: individual, individual