code: def matnorm_logp_marginal_row(x, row_cov, col_cov, marg, marg_cov):
      """
      Log likelihood for marginal centered matrix-variate normal density.
  
      .. math::
          X &\\sim \\mathcal{MN}(0, Q, C)\\
  
          Y \\mid \\X &\\sim \\mathcal{MN}(AX, R, C),\\
  
          Y &\\sim \\mathcal{MN}(0, R + AQA^T, C)
  
      This function efficiently computes the marginals by unpacking some
      info in the covariance classes and then dispatching to
      `solve_det_marginal`.
  
      Parameters
      ---------------
      x: tf.Tensor
          Observation tensor
      row_cov: CovBase
          Row covariance implementing the CovBase API (:math:`R` above).
      col_cov: CovBase
          Column Covariance implementing the CovBase API (:math:`C` above).
      marg: tf.Tensor
          Marginal factor (:math:`A` above).
      marg_cov: CovBase
          Prior covariance implementing the CovBase API (:math:`Q` above).
      """
      rowsize = tf.cast(tf.shape(input=x)[0], "float64")
      colsize = tf.cast(tf.shape(input=x)[1], "float64")
  
      solve_col = col_cov.solve(tf.transpose(a=x))
      logdet_col = col_cov.logdet
  
      solve_row, logdet_row = solve_det_marginal(
          x, row_cov, marg, marg_cov
      )
  
      return _mnorm_logp_internal(
          colsize, rowsize, logdet_row, logdet_col, solve_row, solve_col
      )
  
file_path: brainiak/brainiak/matnormal/matnormal_likelihoods.py
imports: import tensorflow
  from tensorflow import linalg
  from .utils import scaled_I
  import logging
label_desc: Use image node_id 6 for calling a global function with example usage: matnorm_logp_marginal_row(x, row_cov, col_cov, marg, marg_cov) and returns: _mnorm_logp_internal