code: def construct_controllable_B(num_states, num_controls):
      """
      Generates a fully controllable transition likelihood array, where each
      action (control state) corresponds to a move to the n-th state from any
      other state, for each control factor
      """
  
      num_factors = len(num_states)
  
      B = obj_array(num_factors)
      for factor, c_dim in enumerate(num_controls):
          tmp = np.eye(c_dim)[:, :, np.newaxis]
          tmp = np.tile(tmp, (1, 1, c_dim))
          B[factor] = tmp.transpose(1, 2, 0)
  
      return B
  
imports: import numpy
  import pandas
  import seaborn
  import matplotlib.pyplot
  import warnings
  import itertools
label_desc: Use image node_id 13 for calling a global function with example usage: construct_controllable_B(num_states, num_controls) and returns: B