<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def time_to_datetime(x):
 """Convert a time into a datetime"""

    if isinstance(x, time):
        return datetime.combine(date(1970, 1, 1), x)
    return x