def score_notes(
    self, noteStats: pd.DataFrame, currentLabels: pd.DataFrame, statusColumn: str
  ) -> Tuple[pd.DataFrame, pd.DataFrame]:
    """Returns notes on track for NMR with an intercept below firmRejectThreshold."""
    # Require that notes are currently NMR.  If the note is already on track for firmReject, no need
    # to update the status since a more specific rule has already acted on the note.  If the note is
    # on track for CRNH, leave status unchanged so the finalRatingStatus is CRNH.
    candidateNotes = currentLabels[currentLabels[statusColumn] != c.currentlyRatedNotHelpful][
      [c.noteIdKey]
    ]
    noteStats = noteStats.merge(candidateNotes, on=c.noteIdKey, how="inner")
    noteStatusUpdates = noteStats.loc[
      (noteStats[c.internalNoteInterceptKey] < self._firmRejectThreshold)
    ][[c.noteIdKey]]
    noteStatusUpdates[statusColumn] = self._status
    return (noteStatusUpdates, None)
Returns notes on track for NMR with an intercept below firmRejectThreshold.
sourcecode/scoring/scoring_rules.py