code: def _target_transform(self, data: DataFrame, stage: str) -> DataFrame:
      if self.config.task != "regression":
          return data
      # target transform only for regression
      if not all(col in data.columns for col in self.config.target):
          return data
      if self.do_target_transform:
          if stage == "fit" or self.target_transforms is None:
              target_transforms = []
              for col in self.config.target:
                  _target_transform = copy.deepcopy(
                      self.target_transform_template
                  )
                  data[col] = _target_transform.fit_transform(
                      data[col].values.reshape(-1, 1)
                  )
                  target_transforms.append(_target_transform)
              self.target_transforms = target_transforms
          else:
              for col, _target_transform in zip(
                  self.config.target, self.target_transforms
              ):
                  data[col] = _target_transform.transform(
                      data[col].values.reshape(-1, 1)
                  )
      return data
  
imports: import re
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import joblib
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  from omegaconf import DictConfig
  from pandas import DataFrame, DatetimeTZDtype, to_datetime
  from pandas.tseries import offsets
  from pandas.tseries.frequencies import to_offset
  from sklearn.base import TransformerMixin, copy
  from sklearn.preprocessing import FunctionTransformer, LabelEncoder, PowerTransformer, QuantileTransformer, StandardScaler
  from torch.utils.data import DataLoader, Dataset
  from pytorch_tabular.config import InferredConfig
  from pytorch_tabular.utils import get_logger
  from .categorical_encoders import OrdinalEncoder
label_desc: Use image node_id 21 for calling the TabularDatamodule obj's underlying member method code with example usage: obj._target_transform(data, stage) and returns: data, data, data