code: def get_single_random_path(
      predict, model, data, label, new_observation, random_path, b
  ):
      current_data = deepcopy(data)
      yhats = np.empty(len(random_path) + 1)
      yhats[0] = predict(model, current_data).mean()
      for i, candidate in enumerate(random_path):
          current_data.iloc[:, candidate] = new_observation.iloc[
              0, candidate
          ]
          yhats[i + 1] = predict(model, current_data).mean()
  
      diffs = np.diff(yhats)
  
      variable_names = data.columns[random_path]
  
      new_observation_f = new_observation.loc[:, variable_names].apply(
          lambda x: nice_format(x.iloc[0])
      )
  
      return pd.DataFrame(
          {
              "variable": [
                  " = ".join(pair)
                  for pair in zip(variable_names, new_observation_f)
              ],
              "contribution": diffs,
              "variable_name": variable_names,
              "variable_value": new_observation.loc[
                  :, variable_names
              ].values.reshape(
                  -1,
              ),
              "sign": np.sign(diffs),
              "label": label,
              "B": b,
          }
      )
  
file_path: DALEX/python/dalex/dalex/predict_explanations/_shap/utils.py
imports: import multiprocessing
  from copy import deepcopy
  from numpy.random import SeedSequence, default_rng
  import numpy
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: get_single_random_path(predict, model, data, label, new_observation, random_path, b) and returns: pd