In the chess lesson, how does make_move gets its argument?

Does make_move function gets a random move as argument from the all the possible legal moves? If so, where in the code tells the make_move function to get a random move from the legal_moves?