code: def ensure_datetime(dobj, time_part=None):
      
      if isinstance(dobj, dt.datetime):
          return dobj
      return dt.datetime.combine(dobj, time_part or dt.time())
docs: Adds time part to dobj if its a date object, returns dobj
          untouched if its a datetime object.