After reviewing your codes,
please compare your grader cell with the image I am sharing, you can see yourself where you have gone wrong. you have edited the template code. Kindly re-do this assignment based on the image template given. even if you are recalling cost_sum separately, which is fine. you have recalled cost outside the start code here. the cost code line, there is an extra tuple.
I wrote my codes without using cost_sum and the given template code. so what correction could you do make the correct.
if your cost += to code you have written
then use total_cost = only (1/(2 *m)) * cost
then won’t require cost_sum extra code line.
refer the hints, your codes are almost correct. but editing can cause such failure.