code: def generate_point_predictions(self, pi, sigma, mu, n_samples=None):
      # Sample using n_samples and take average
      samples = self.generate_samples(pi, sigma, mu, n_samples)
      if self.hparams.central_tendency == "mean":
          y_hat = torch.mean(samples, dim=-1)
      elif self.hparams.central_tendency == "median":
          y_hat = torch.median(samples, dim=-1).values
      return y_hat.unsqueeze(1)
  
imports: import math
  import torch
  from omegaconf import DictConfig
  from torch import nn
  from torch.autograd import Variable
  from torch.distributions import Categorical
  from pytorch_tabular.models.common.heads import config
  from pytorch_tabular.utils import _initialize_layers, _linear_dropout_bn
label_desc: Use image node_id 8 for calling the MixtureDensityHead obj's underlying member method code with example usage: obj.generate_point_predictions(pi, sigma, mu, n_samples) and returns: y_hat