def get_tag_thresholds(ratings: pd.DataFrame, percentile: int) -> Dict[str, float]:
  """Determine a Nth percentile threshold for each adjusted ratio tag.

  Args:
    ratings: DataFrame containing adjusted ratio columns
    percnetile: int in the range [0, 100)

  Returns:
    Dictionary mapping adjusted ratio columns to a threshold value
  """
  thresholds = {}
  for column in c.notHelpfulTagsAdjustedRatioColumns:
    if len(ratings[column]) == 0:
      logger.info(
        f"Warning: No ratings for column {column} in get_tag_thresholds. Setting threshold to 0.0 arbitrarily."
      )
      thresholds[column] = 0.0
    else:
      thresholds[column] = np.quantile(ratings[column], np.arange(0, 1, 0.01))[percentile]
  return thresholds
Determine a Nth percentile threshold for each adjusted ratio tag.

  Args:
    ratings: DataFrame containing adjusted ratio columns
    percnetile: int in the range [0, 100)

  Returns:
    Dictionary mapping adjusted ratio columns to a threshold value
  
sourcecode/scoring/tag_filter.py