2. Define a function max_n(arr, n) that takesin an array and an integer as arguments. Your function will thenreturn the n largest values from that array as anarray containing n elements. It is safe to assume that arr willhave at least n elements. The resulting array should have thelargest number on the end and the smallest number at thebeginning.
For Example:
max_n(np.array([1,2,3,4,5]), 3) returnsnp.array([3,4,5])
max_n(np.array([10,9,8,7,6,5]), 4) returnsnp.array([7,8,9,10])
max_n(np.array([1,1,1]), 2) returnsnp.array([1,1])