Error en C2w4,ejercicio 1

I am stuck on the first exercise. I did my exercise well, as I tested it in pyton from google colab and it gives me the expected result. The entropy of y_train gave me 1. But in the course lab I got the

File “”, line 4
def compute_entropy(y):
SyntaxError: invalid syntax

It is not a syntax error since according my knowledes it iste rigth way of defining a pyton function

Pf a little help

Please use english on this forum to improve your odds of getting an answer.