code: def _compute_grey_code_row_values_st(
      row_values,
      mask,
      inds,
      outputs,
      shapley_coeff,
      extended_delta_indexes,
      noop_code,
  ):
      set_size = 0
      M = len(inds)
      for i in range(2**M):
          # update the mask
          delta_ind = extended_delta_indexes[i]
          if delta_ind != noop_code:
              mask[delta_ind] = ~mask[delta_ind]
              if mask[delta_ind]:
                  set_size += 1
              else:
                  set_size -= 1
  
          # distribute the effect of this mask set over all the terms it impacts
          out = outputs[i]
          for j in range(M):
              for k in range(j + 1, M):
                  if not mask[j] and not mask[k]:
                      delta = out * shapley_coeff[set_size]  # * 2
                  elif (not mask[j] and mask[k]) or (
                      mask[j] and not mask[k]
                  ):
                      delta = -out * shapley_coeff[set_size - 1]  # * 2
                  else:  # both true
                      delta = out * shapley_coeff[set_size - 2]  # * 2
                  row_values[j, k] += delta
                  row_values[k, j] += delta
  
file_path: shap/shap/explainers/_exact.py
imports: import logging
  import numpy
  from numba import njit
  from ..None import links
  from ..models import Model
  from ..utils import MaskedModel, delta_minimization_order, make_masks, shapley_coefficients
  from ._explainer import Explainer
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_grey_code_row_values_st(row_values, mask, inds, outputs, shapley_coeff, extended_delta_indexes, noop_code) without return types