docstr: Parameters
  ----------
  relabel : bool
      whether returns posteriors after relabeling some parameters such as regressors etc.
  permute : bool
      default as true where chain information will be masked and the chain dimension will be collapsed; when
  it is set to false, additional chain dimension will be introduced at front before batch / sample dimension
  this is useful for arviz plotting. This argument is only effective for stan-mcmc estimator.
  
  Returns
  -------
  OrderedDict
      dictionary where each item represents the posterior samples of a specific parameter.
docstr_tok: ["Parameters","--","--","--","--","--","relabel",":","bool","whether","returns","posteriors","after","relabeling","some","parameters","such","as","regressors","etc",".","permute",":","bool","default","as","true","where","chain","information","will","be","masked","and","the","chain","dimension","will","be","collapsed",";","when","it","is","set","to","false",",","additional","chain","dimension","will","be","introduced","at","front","before","batch","\/","sample","dimension","this","is","useful","for","arviz","plotting",".","This","argument","is","only","effective","for","stan-mcmc","estimator",".","Returns","--","--","--","-","OrderedDict","dictionary","where","each","item","represents","the","posterior","samples","of","a","specific","parameter","."]
code: def get_posterior_samples(
      self, relabel: bool = False, permute: bool = True
  ):
      """
      Parameters
      ----------
      relabel : bool
          whether returns posteriors after relabeling some parameters such as regressors etc.
      permute : bool
          default as true where chain information will be masked and the chain dimension will be collapsed; when
      it is set to false, additional chain dimension will be introduced at front before batch / sample dimension
      this is useful for arviz plotting. This argument is only effective for stan-mcmc estimator.
  
      Returns
      -------
      OrderedDict
          dictionary where each item represents the posterior samples of a specific parameter.
      """
      posterior_samples = deepcopy(self._posterior_samples)
      if relabel:
          regressors = self.get_regressors()
          if len(regressors) > 0:
              if len(regressors) == 1:
                  posterior_samples[regressors[0]] = posterior_samples[
                      "beta"
                  ]
              else:
                  for i, regressor in enumerate(regressors):
                      posterior_samples[regressor] = posterior_samples[
                          "beta"
                      ][:, i]
              del posterior_samples["beta"]
  
      if not permute:
          if self.estimator_type == StanEstimatorMCMC:
              for key, val in posterior_samples.items():
                  posterior_samples[key] = val.reshape(
                      (
                          self.estimator.chains,
                          self.estimator._num_sample_per_chain,
                          *val.shape[1:],
                      )
                  )
      return posterior_samples
  
imports: from copy import deepcopy
  import numpy
  import pandas
  import warnings
  from enum import Enum
  from typing import Dict, Any
  from ..exceptions import ForecasterException, AbstractMethodException, IllegalArgument
  from ..utils.general import is_ordered_datetime, is_even_gap_datetime
  from ..template.model_template import ModelTemplate
  from ..estimators.stan_estimator import StanEstimatorMCMC
  from ..constants.constants import TrainingMetaKeys, PredictionMetaKeys
label_desc: Use image node_id 15 for calling the Forecaster obj's underlying member method code with example usage: obj.get_posterior_samples(relabel, permute) and returns: posterior_samples