code: def _split_covariance_into_marginals(covariance, block_sizes):
      """Split a covariance matrix into block-diagonal marginals of given sizes."""
      start_dim = 0
      marginals = []
      for size in block_sizes:
          end_dim = start_dim + size
          marginals.append(
              covariance[..., start_dim:end_dim, start_dim:end_dim]
          )
          start_dim = end_dim
      return marginals
  
file_path: probability/tensorflow_probability/python/sts/decomposition.py
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental import util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.sts.internal import util
label_desc: Use image node_id 1 for calling a global function with example usage: _split_covariance_into_marginals(covariance, block_sizes) and returns: marginals