code: def pdf(self, x):
      alpha, beta, scale_matrix = (
          self.alpha,
          self.beta,
          self.scale_matrix,
      )
      p = scale_matrix.shape[0]
      if isinstance(x, list):
          x = ImmutableMatrix(x)
      if not isinstance(x, (MatrixBase, MatrixSymbol)):
          raise ValueError(
              "%s should be an isinstance of Matrix "
              "or MatrixSymbol" % str(x)
          )
      sigma_inv_x = -Inverse(scale_matrix) * x / beta
      term1 = exp(Trace(sigma_inv_x)) / (
          (beta ** (p * alpha)) * multigamma(alpha, p)
      )
      term2 = (Determinant(scale_matrix)) ** (-alpha)
      term3 = (Determinant(x)) ** (alpha - S(p + 1) / 2)
      return term1 * term2 * term3
  
imports: from math import prod
  from sympy.core.basic import Basic
  from sympy.core.numbers import pi
  from sympy.core.singleton import S
  from sympy.functions.elementary.exponential import exp
  from sympy.functions.special.gamma_functions import multigamma
  from sympy.core.sympify import sympify, _sympify
  from sympy.matrices import ImmutableMatrix, Inverse, Trace, Determinant, MatrixSymbol, MatrixBase, Transpose, MatrixSet, matrix2numpy
  from sympy.stats.rv import _value_check, RandomMatrixSymbol, NamedArgsMixin, PSpace, _symbol_converter, MatrixDomain, Distribution
  from sympy.external import import_module
label_desc: Use image node_id 4 for calling the MatrixGammaDistribution obj's underlying member method code with example usage: obj.pdf(x) and returns: unknown