code: def dot_likelihood(A, obs):
      s = np.ones(np.ndim(A), dtype=int)
      s[0] = obs.shape[0]
      X = A * obs.reshape(tuple(s))
      X = np.sum(X, axis=0, keepdims=True)
      LL = np.squeeze(X)
  
      # check to see if `LL` is a scalar
      if np.prod(LL.shape) <= 1.0:
          LL = LL.item()
          LL = np.array([LL]).astype("float64")
  
      return LL
  
imports: import numpy
  from scipy import special
  from pymdp import utils
  from itertools import chain
label_desc: Use image node_id 5 for calling a global function with example usage: dot_likelihood(A, obs) and returns: LL