adds assert statements to lambda_magic