in lambda-powertools-feature-flags/app/products/app.py [0:0]
def get_products(id=None) -> List[Dict]:
if id:
resp_products = list(filter(lambda x: x["productId"] == id, all_products))
else:
resp_products = all_products
resp_products = add_discount(resp_products)
return resp_products