code: def create_B_matrix_stubs(model_labels):
      (
          _,
          _,
          num_states,
          _,
          num_controls,
          _,
      ) = get_model_dimensions_from_labels(model_labels)
  
      state_labels = model_labels["states"]
      action_labels = model_labels["actions"]
  
      B_matrices = {}
  
      for f_idx, factor in enumerate(state_labels.keys()):
          control_fac_name = list(action_labels)[f_idx]
          factor_list = [state_labels[factor]] + [
              action_labels[control_fac_name]
          ]
  
          prev_state_action_combos = pd.MultiIndex.from_product(
              factor_list,
              names=[factor, list(action_labels.keys())[f_idx]],
          )
  
          num_state_action_combos = (
              num_states[f_idx] * num_controls[f_idx]
          )
  
          num_rows = num_states[f_idx]
  
          cell_values = np.zeros((num_rows, num_state_action_combos))
  
          next_state_list = state_labels[factor]
  
          B_matrix_f = pd.DataFrame(
              cell_values,
              index=next_state_list,
              columns=prev_state_action_combos,
          )
  
          B_matrices[factor] = B_matrix_f
  
      return B_matrices
  
imports: import numpy
  import pandas
  import seaborn
  import matplotlib.pyplot
  import warnings
  import itertools
label_desc: Use image node_id 30 for calling a global function with example usage: create_B_matrix_stubs(model_labels) and returns: B_matrices