def score_notes(
    self, noteStats: pd.DataFrame, currentLabels: pd.DataFrame, statusColumn: str
  ) -> Tuple[pd.DataFrame, pd.DataFrame]:
    """Returns notes on track for CRH with high levels of any tag to receive NMR status."""
    # Prune noteStats to exclude CRNH notes.  CRNH will have stronger downstream effects, so
    # we don't want to over-write that status.
    candidateNotes = currentLabels[currentLabels[statusColumn] != c.currentlyRatedNotHelpful][
      [c.noteIdKey]
    ]
    noteStats = noteStats.merge(candidateNotes, on=c.noteIdKey, how="inner")

    # Identify impacted notes.
    noteStatusUpdates = noteStats.loc[
      (noteStats["notHelpfulIncorrect_interval"] >= self._tagThreshold)
      & (noteStats["num_voters_interval"] >= self._voteThreshold)
      & (noteStats["tf_idf_incorrect_interval"] >= self._weightedTotalVotes)
    ][[c.noteIdKey]]

    pd.testing.assert_frame_equal(noteStatusUpdates, noteStatusUpdates.drop_duplicates())

    logger.info(f"Total notes impacted by incorrect filtering: {len(noteStatusUpdates)}")
    noteStatusUpdates[statusColumn] = self._status

    return (noteStatusUpdates, None)
Returns notes on track for CRH with high levels of any tag to receive NMR status.
sourcecode/scoring/scoring_rules.py