docs: def to_links_df(regressor_type,
                  regressor_kwargs,
                  trained_regressor,
                  tf_matrix_gene_names,
                  target_gene_name):
      """
      :param regressor_type: string. Case insensitive.
      :param regressor_kwargs: dict of key-value pairs that configures the regressor.
      :param trained_regressor: the trained model from which to extract the feature importances.
      :param tf_matrix_gene_names: the list of names corresponding to the columns of the tf_matrix used to train the model.
      :param target_gene_name: the name of the target gene.
      :return: a Pandas DataFrame['TF', 'target', 'importance'] representing inferred regulatory links and their
               connection strength.
      """
  
      def pythonic():
          # feature_importances = trained_regressor.feature_importances_
          feature_importances = to_feature_importances(regressor_type, regressor_kwargs, trained_regressor)
  
          links_df = pd.DataFrame({'TF': tf_matrix_gene_names, 'importance': feature_importances})
          links_df['target'] = target_gene_name
  
          clean_links_df = links_df[links_df.importance > 0].sort_values(by='importance', ascending=False)
  
          return clean_links_df[['TF', 'target', 'importance']]
  
      if is_sklearn_regressor(regressor_type):
          return pythonic()
      elif is_xgboost_regressor(regressor_type):
          raise ValueError('XGB regressor not yet supported')
      else:
          raise ValueError('Unsupported regressor type: ' + regressor_type)