code: def _generate_p_star(num_groups: int) -> np.ndarray:
      """Describe the order in which groups move
  
      Parameters
      ---------
      num_groups : int
  
      Returns
      -------
      np.ndarray
          Matrix P* - size (g-by-g)
      """
      p_star = np.eye(num_groups, num_groups)
      rd.shuffle(p_star)
      return p_star
  
imports: import numpy
  from typing import Dict
  import numpy.random
  import warnings
  from .local import LocalOptimisation
  from .brute import BruteForce
  from .strategy import SampleMorris
  from SALib.sample import common_args
  from SALib.util import scale_samples, read_param_file, compute_groups_matrix, _define_problem_with_groups, _compute_delta, _check_groups
label_desc: Use image node_id 5 for calling a global function with example usage: _generate_p_star(num_groups) and returns: p_star