code: def reduce_model(ft_model, target_dim):
      """
      ft_model is an instance of `_FastText` class
      This function computes the PCA of the input and the output matrices
      and sets the reduced ones.
      """
      inp_reduced, proj = _reduce_matrix(
          ft_model.get_input_matrix(), target_dim, None
      )
      out_reduced, _ = _reduce_matrix(
          ft_model.get_output_matrix(), target_dim, proj
      )
  
      ft_model.set_matrices(inp_reduced, out_reduced)
  
      return ft_model
  
file_path: fastText/python/fasttext_module/fasttext/util/util.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import sys
  import shutil
  import os
  import gzip
label_desc: Use image node_id 4 for calling a global function with example usage: reduce_model(ft_model, target_dim) and returns: ft_model