docstr: Calculate inverses for a batch of matrices using Cholesky decomposition method.
  
  :param matrix: matrix (or matrices) to invert,
      of shape (num_var, num_var) or
      of shape (batch_size, num_var, num_var) or
      of shape (batch_size, time_step, num_var, num_var).
  :return: inverted matrix (or matrices),
      of shape (num_var, num_var) or
      of shape (batch_size, num_var, num_var) or
      of shape (batch_size, time_step, num_var, num_var).
docstr_tok: ["Calculate","inverses","for","a","batch","of","matrices","using","Cholesky","decomposition","method",".",":","param","matrix",":","matrix","(","or","matrices",")","to","invert",",","of","shape","(","num_var",",","num_var",")","or","of","shape","(","batch_size",",","num_var",",","num_var",")","or","of","shape","(","batch_size",",","time_step",",","num_var",",","num_var",")",".",":","return",":","inverted","matrix","(","or","matrices",")",",","of","shape","(","num_var",",","num_var",")","or","of","shape","(","batch_size",",","num_var",",","num_var",")","or","of","shape","(","batch_size",",","time_step",",","num_var",",","num_var",")","."]
code: def inverse_using_cholesky(self, matrix: nd_sym_type) -> nd_sym_type:
      """
      Calculate inverses for a batch of matrices using Cholesky decomposition method.
  
      :param matrix: matrix (or matrices) to invert,
          of shape (num_var, num_var) or
          of shape (batch_size, num_var, num_var) or
          of shape (batch_size, time_step, num_var, num_var).
      :return: inverted matrix (or matrices),
          of shape (num_var, num_var) or
          of shape (batch_size, num_var, num_var) or
          of shape (batch_size, time_step, num_var, num_var).
      """
      cholesky_factor = self.F.linalg.potrf(matrix)
      return self.F.linalg.potri(cholesky_factor)
  
imports: from typing import List, Tuple, Union
  from types import ModuleType
  import math
  import mxnet
  from mxnet.gluon import nn
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.core_types import ActionProbabilities
  from rl_coach.spaces import SpacesDefinition, BoxActionSpace, DiscreteActionSpace
  from rl_coach.utils import eps
  from rl_coach.architectures.mxnet_components.heads.head import Head, HeadLoss, LossInputSchema, NormalizedRSSInitializer
  from rl_coach.architectures.mxnet_components.heads.head import LOSS_OUT_TYPE_LOSS, LOSS_OUT_TYPE_REGULARIZATION
  from rl_coach.architectures.mxnet_components.utils import hybrid_clip, broadcast_like
label_desc: Use image node_id 2 for calling the MultivariateNormalDist obj's underlying member method code with example usage: obj.inverse_using_cholesky(matrix) and returns: self