code: def refine_date_col(data, col):
      data["Day"] = data[col].day()
      data["Month"] = data[col].month() + 1  # Since H2O indexes from 0
      data["Year"] = data[col].year() + 1900  # Start of epoch is 1900
      data["WeekNum"] = data[col].week()
      data["WeekDay"] = data[col].dayOfWeek()
      data["HourOfDay"] = data[col].hour()
  
      # Create weekend and season cols
      # Spring = Mar, Apr, May. Summer = Jun, Jul, Aug. Autumn = Sep, Oct. Winter = Nov, Dec, Jan, Feb.
      # data["Weekend"] = [1 if x in ("Sun", "Sat") else 0 for x in data["WeekDay"]]
      data["Weekend"] = (data["WeekDay"] == "Sun") | (
          data["WeekDay"] == "Sat"
      )
      assert (
          data["Weekend"].min() < data["Weekend"].max()
      )  # Not a constant result
      data["Season"] = data["Month"].cut(
          [0, 2, 5, 7, 10, 12],
          ["Winter", "Spring", "Summer", "Autumn", "Winter"],
      )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
label_desc: Use image node_id 1 for calling a global function with example usage: refine_date_col(data, col) without return types