code: def validation_step(self, batch, batch_idx):
      with torch.no_grad():
          output, y = self.forward_pass(batch)
          # y is not None for SSL task.Rest of the tasks target is
          # fetched from the batch
          y = batch["target"] if y is None else y
          y_hat = output["logits"]
          self.calculate_loss(output, y, tag="valid")
          self.calculate_metrics(y, y_hat, tag="valid")
      return y_hat, y
  
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 23 for calling the BaseModel obj's underlying member method code with example usage: obj.validation_step(batch, batch_idx) and returns: y_hat,  y