code: def date_to_datetime(x):
      """Convert a date into a datetime"""
      if not isinstance(x, datetime) and isinstance(x, date):
          return datetime.combine(x, time())
      return x
  
imports: from datetime import date, datetime, time, timedelta
  from pygal._compat import timestamp
  from pygal.adapters import positive
  from pygal.graph.xy import XY
label_desc: Use image node_id 3 for calling a global function with example usage: date_to_datetime(x) and returns: x, datetime