code: def add_date_features_dict(row, date_col):
      date_feature_dict = {}
  
      # Handle cases where the val for the date_col is None
      try:
          date_val = row[date_col]
          if date_val == None:
              return date_feature_dict
          if not isinstance(
              date_val, (datetime.datetime, datetime.date)
          ):
              date_val = dateutil.parser.parse(date_val)
      except:
          return date_feature_dict
  
      # Make a copy of all the engineered features from the date, without modifying the original object at all
      # This way the same original object can be passed into a number of different trained auto_ml predictors
  
      date_feature_dict[date_col + "_day_of_week"] = date_val.weekday()
      # nesting this inside a try/except block because the date might be a datetime.date, not a datetime.datetime
      try:
          date_feature_dict[date_col + "_hour"] = date_val.hour
  
          date_feature_dict[date_col + "_minutes_into_day"] = (
              date_val.hour * 60 + date_val.minute
          )
      except AttributeError:
          pass
  
      date_feature_dict[
          date_col + "_is_weekend"
      ] = date_val.weekday() in (5, 6)
  
      return date_feature_dict
  
imports: import datetime
  import os
  import dateutil
  import numpy
  import pandas
  from pandas import __version__
  import pathos
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.feature_extraction.text import TfidfVectorizer
  import warnings
label_desc: Use image node_id 5 for calling a global function with example usage: add_date_features_dict(row, date_col) and returns: date_feature_dict, date_feature_dict, date_feature_dict