code: def generate_p_star(num_groups):
      
      p_star = np.eye(num_groups, num_groups)
      rd.shuffle(p_star)
      return p_star
docs: Describe the order in which groups move
  
      Arguments
      ---------
      num_groups : int
  
      Returns
      -------
      np.ndarray
          Matrix P* - size (g-by-g)