when you implement this function you choose only the X_train (X_train.mean(axis=0)) but in function we send to the function parameter called X so yo convert all X_train in your code of function estimate_gaussian to X which is send you as parameter of function to make your code run generally on any test cases
please feel free to ask any questions,
Thanks,
Abdelrahman