docstr: The preprocessing, like Categorical Encoding, Normalization, etc. which any dataframe should undergo before
  feeding into the dataloder.
  
  Args:
      data (DataFrame): A dataframe with the features and target
      stage (str, optional): Internal parameter. Used to distinguisj between fit and inference.
          Defaults to "inference".
  
  Returns:
      Returns the processed dataframe and the added features(list) as a tuple
docstr_tok: ["The","preprocessing",",","like","Categorical","Encoding",",","Normalization",",","etc",".","which","any","dataframe","should","undergo","before","feeding","into","the","dataloder",".","Args",":","data","(","DataFrame",")",":","A","dataframe","with","the","features","and","target","stage","(","str",",","optional",")",":","Internal","parameter",".","Used","to","distinguisj","between","fit","and","inference",".","Defaults","to","``","inference","''",".","Returns",":","Returns","the","processed","dataframe","and","the","added","features","(","list",")","as","a","tuple"]
code: def preprocess_data(
      self, data: DataFrame, stage: str = "inference"
  ) -> Tuple[DataFrame, list]:
      """The preprocessing, like Categorical Encoding, Normalization, etc. which any dataframe should undergo before
      feeding into the dataloder.
  
      Args:
          data (DataFrame): A dataframe with the features and target
          stage (str, optional): Internal parameter. Used to distinguisj between fit and inference.
              Defaults to "inference".
  
      Returns:
          Returns the processed dataframe and the added features(list) as a tuple
      """
      added_features = None
      if self.config.encode_date_columns:
          data, added_features = self._encode_date_columns(data)
      # The only features that are added are the date features extracted
      # from the date which are categorical in nature
      if (added_features is not None) and (stage == "fit"):
          logger.debug(
              f"Added {added_features} features after encoding the date_columns"
          )
          self.config.categorical_cols += added_features
          # Update the categorical dimension in config
          self.config.categorical_dim = (
              len(self.config.categorical_cols)
              if self.config.categorical_cols is not None
              else 0
          )
          self._inferred_config = self._update_config(self.config)
      # Encoding Categorical Columns
      if len(self.config.categorical_cols) > 0:
          data = self._encode_categorical_columns(data, stage)
  
      # Transforming Continuous Columns
      if (self.config.continuous_feature_transform is not None) and (
          len(self.config.continuous_cols) > 0
      ):
          data = self._transform_continuous_columns(data, stage)
      # Normalizing Continuous Columns
      if (self.config.normalize_continuous_features) and (
          len(self.config.continuous_cols) > 0
      ):
          data = self._normalize_continuous_columns(data, stage)
      # Converting target labels to a 0 indexed label
      data = self._label_encode_target(data, stage)
      # Target Transforms
      data = self._target_transform(data, stage)
      return data, added_features
  
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 22 for calling the TabularDatamodule obj's underlying member method code with example usage: obj.preprocess_data(data, stage) and returns: data,  added_features