code: def _compute_b_star(
      J: np.ndarray,
      x_star: np.ndarray,
      delta: float,
      B: np.ndarray,
      G: np.ndarray,
      P_star: np.ndarray,
      D_star: np.ndarray,
  ) -> np.ndarray:
      """
      Compute the random sampling matrix B*.
  
      Parameters
      ----------
      J: matrix of 1's
      x_star: randomly chosen "base value" of x
      delta: parameters variation
      B: sampling matrix (not random)
      G: groups matrix
      P_star: random permutation matrix
      D_star: diagonal matrix with each element being +1 or -1, with equal
              probability
  
      Returns
      -------
      Random sampling matrix B*
      """
      element_a = J[0, :] * x_star
      element_b = np.matmul(G, P_star).T
      element_c = np.matmul(2.0 * B, element_b)
      element_d = np.matmul((element_c - J), D_star)
  
      b_star = element_a + (delta / 2.0) * (element_d + J)
      return b_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 4 for calling a global function with example usage: _compute_b_star(J, x_star, delta, B, G, P_star, D_star) and returns: b_star