docstr: Reconcile samples if `coherent_pred_samples` is True.
  
  Parameters
  ----------
  samples
      Tensor of shape (num_parallel_samples*batch_size, 1, target_dim)
  
  Returns
  -------
      Tensor of coherent samples.
docstr_tok: ["Reconcile","samples","if","`","coherent_pred_samples","`","is","True",".","Parameters","--","--","--","--","--","samples","Tensor","of","shape","(","num_parallel_samples","*","batch_size",",","1",",","target_dim",")","Returns","--","--","--","-","Tensor","of","coherent","samples","."]
code: def post_process_samples(self, samples: Tensor) -> Tensor:
      """
      Reconcile samples if `coherent_pred_samples` is True.
  
      Parameters
      ----------
      samples
          Tensor of shape (num_parallel_samples*batch_size, 1, target_dim)
  
      Returns
      -------
          Tensor of coherent samples.
      """
      if not self.coherent_pred_samples:
          samples_to_return = samples
      else:
          samples_to_return = reconcile_samples(
              reconciliation_mat=self.M,
              samples=samples,
              seq_axis=self.seq_axis,
          )
          assert_shape(samples_to_return, samples.shape)
  
      # Show coherency error: A*X_proj
      if self.log_coherency_error:
          coh_error = coherency_error(
              S=self.S, samples=samples_to_return.asnumpy()
          )
          logger.info(
              "Coherency error of the predicted samples for time step"
              f" {self.forecast_time_step}: {coh_error}"
          )
          self.forecast_time_step += 1
  
      return samples_to_return
  
imports: import logging
  from typing import List, Optional
  from itertools import product
  import mxnet
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.distribution import Distribution, DistributionOutput
  from gluonts.mx.distribution import EmpiricalDistribution
  from gluonts.mx.util import assert_shape
  from gluonts.mx.distribution import LowrankMultivariateGaussian
  from gluonts.mx.model.deepvar._network import DeepVARNetwork, DeepVARTrainingNetwork, DeepVARPredictionNetwork
label_desc: Use image node_id 4 for calling the DeepVARHierarchicalNetwork obj's underlying member method code with example usage: obj.post_process_samples(samples) and returns: samples_to_return