input: Write a python function to perform PCA on a given 2D NumPy array and return the first principal component. 
  assert (perform_pca(np.array([[1,2,3],[4,5,6],[7,8,9]]), 2) == np.array([-5.19615242,  0.        ,  5.19615242])).all()
  assert (perform_pca(np.array([[10,20,30],[40,50,60],[70,80,90]]), 2) == np.array([-51.96152423,   0.        ,  51.96152423])).all()
  assert (perform_pca(np.array([[2,4,6],[8,10,12],[14,16,18]]), 2) == np.array([-10.39230485,   0.        ,  10.39230485])).all()
output: def perform_pca(X, n_components):
      from sklearn.decomposition import PCA
      
      pca = PCA(n_components=n_components)
      transformed_data = pca.fit_transform(X)
      
      return transformed_data[:, 0]