<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_datetime(date):
 """Transforms a date or datetime object into a date object."""

    return datetime.datetime(date.year, date.month, date.day)