Def get_best_split(X, y, node_indices):

UNQ_C4

GRADED FUNCTION: get_best_split

The function definition I created succeeds in the displayed test but fails in the hidden test with error:
IndexError: index 5 is out of bounds for axis 0 with size 5

The grader uses different tests than the ones in the notebook.

Check that your code can work for any size and shape of dataset. Avoid using constant values when a variable would be a better choice.

All the other tests I have passed. Why does it not check each test as correct or incorrect, as is usual? For this reason, I cannot get a pass

The tests in the notebook are not exhaustive.

It’s possible for a function to pass its tests, but still cause failures of other tests that use that function.

But why is it not considering the other tests that have passed hidden tests

The grader runs totally independently from the tests inside the notebook.
It has a totally different set of tests.

Please check your personal message area for instructions.