<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert_datetimes_to_timestamps(data, datetime_attrs):
 """ Given a dictionary of data, and a dictionary of datetime attributes, return a new dictionary that converts any datetime attributes that may be present to their timestamped equivalent. """

    if not data:
        return data

    new_data = {}
    for key, value in data.items():
        if key in datetime_attrs and isinstance(value, datetime):
            new_key = datetime_attrs[key]
            new_data[new_key] = timestamp_from_dt(value)
        else:
            new_data[key] = value

    return new_data