code: def reduce_dims(matrix, target_dim):
      """Reduce dimensionality of the data using PCA.
  
      Args:
          matrix (np.ndarray): Matrix of the form (n_sampes, n_features)
          target_dim (uint): Dimension to which n_features should be reduced to.
  
      """
      model = PCA(n_components=target_dim)
      model.fit(matrix)
      return model.transform(matrix)
  
imports: import numpy
  from sklearn.decomposition import PCA
label_desc: Use image node_id 3 for calling a global function with example usage: reduce_dims(matrix, target_dim) and returns: model