Hi,
For week 4 assignment 1 I am able to pass all the tests inside the notebook but get this error when submitting: Code Cell UNQ_C3: Unexpected error (UnboundLocalError(“local variable ‘identity’ referenced before assignment”)) occurred during function check. We expected function who_is_it
to return compute_layer_style_cost test 1 failed. Please check that this function is defined properly.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
However, here is my code passing the tests for that question. Am I guessing this occurs because if the min_dist > dist then identity is not set but it is returned resulting in the error above. So I was able to fix it by adding a identity = None line in the if min_dist > 0.7 code block and that seems to have solved this problem. But just an FYI regarding the autograder