<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dt64_to_dt(dt64):
 """ Safely converts NumPy datetime64 to a datetime object. """

    ts = (dt64 - np.datetime64('1970-01-01T00:00:00')) / np.timedelta64(1, 's')
    return dt.datetime.utcfromtimestamp(ts)