code: def _distribution_method_invoker(dist, func, *args):
      """Wrapper for invoking different types of class methods with one unified
      interface.
  
      Parameters
      ----------
      dist : Distribution
      func : method
      """
      if len(args) == 0:
          out = getattr(dist, func)
          if callable(out):
              return out()
          else:
              return out
      return getattr(dist, func)(*args)
  
imports: import mxnet
  import numpy
  from mxnet import np, npx, autograd
  from mxnet import gluon
  import mxnet.gluon.probability
  from mxnet.gluon.probability import StochasticBlock, StochasticSequential
  from mxnet.gluon import HybridBlock
  from mxnet.test_utils import use_np, assert_almost_equal
  from numpy.testing import assert_array_equal
  import pytest
  import scipy.stats
  import scipy.special
  import itertools
  from numbers import Number
label_desc: Use image node_id 2 for calling a global function with example usage: _distribution_method_invoker(dist, func) and returns: getattr, out, out