def METHOD_NAME(ds: xr.Dataset):
    if isinstance(ds.time.values[0], np.datetime64):
        cf_time = []
        for date in ds.time.values:
            date = pd.to_datetime(date)
            cf_time.append(
                cftime.DatetimeJulian(
                    date.year,
                    date.month,
                    date.day,
                    date.hour,
                    date.minute,
                    date.second,
                )
            )
        ds["time"] = xr.DataArray(cf_time, coords=ds.time.coords, attrs=ds.time.attrs)
    return ds