def get_customer_by_id(customer_id):
    return Customer.find(_id=customer_id)
def get_all_customers_by_attribute(attribute_name, value):
    try:
        return Customer.find(**{attribute_name: value})
    except ValueError:
        print(f"The attribute_name; {attribute_name} was incorrect.")
def change_car_attribute(car, attribute_name, new_value):
    value = Customer.find(**{'cars': car})[0].cars
    value[0].update({attribute_name: new_value})
    Customer.change_attribute(
        Customer.find(**{'cars': car})[0]._id, 'cars', value)