docstr: Packs the output of the model.
  
  Args:
      y_hat (torch.Tensor): The output of the model
  
      backbone_features (torch.tensor): The backbone features
  
  Returns:
      The packed output of the model
code: def pack_output(
      self, y_hat: torch.Tensor, backbone_features: torch.tensor
  ) -> Dict[str, Any]:
      """Packs the output of the model.
  
      Args:
          y_hat (torch.Tensor): The output of the model
  
          backbone_features (torch.tensor): The backbone features
  
      Returns:
          The packed output of the model
      """
      # if self.head is the Identity function it means that we cannot extract backbone features,
      # because the model cannot be divide in backbone and head (i.e. TabNet)
      if type(self.head) is nn.Identity:
          return {"logits": y_hat}
      return {"logits": y_hat, "backbone_features": backbone_features}
  
imports: import importlib
  import warnings
  from abc import ABCMeta, abstractmethod
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
  import numpy
  import pytorch_lightning
  import torch
  import torch.nn
  import torchmetrics
  from omegaconf import DictConfig, OmegaConf
  from pandas import DataFrame
  from torch import Tensor
  from torch.optim import Optimizer
  from pytorch_tabular.models.common.heads import blocks
  from pytorch_tabular.models.common.layers import PreEncoded1dLayer
  from pytorch_tabular.utils import get_logger, reset_all_weights
label_desc: Use image node_id 16 for calling the BaseModel obj's underlying member method code with example usage: obj.pack_output(y_hat, backbone_features) and returns: dict, dict