'Transitional for compatibility.'

@classmethod
def from_reservations(cls, context, reservations, instance=None):

    if (instance is None):
        project_id = None
        user_id = None
    else:
        (project_id, user_id) = ids_from_instance(context, instance)
    quotas = cls()
    quotas._context = context
    quotas.reservations = reservations
    quotas.project_id = project_id
    quotas.user_id = user_id
    quotas.obj_reset_changes()
    return quotas
