code: def get_joint_likelihood(A, obs, num_states):
      # deal with single modality case
      if type(num_states) is int:
          num_states = [num_states]
      A = utils.to_obj_array(A)
      obs = utils.to_obj_array(obs)
      ll = np.ones(tuple(num_states))
      for modality in range(len(A)):
          ll = ll * dot_likelihood(A[modality], obs[modality])
      return ll
  
imports: import numpy
  from scipy import special
  from pymdp import utils
  from itertools import chain
label_desc: Use image node_id 6 for calling a global function with example usage: get_joint_likelihood(A, obs, num_states) and returns: ll