def _get_recent_notes(
    self,
    notes: pd.DataFrame,
    noteStatusHistory: pd.DataFrame,
    cutoffMts: int = (1000 * 60 * 60 * 24 * 365),
  ):
    """Return DataFrame containing notes authored within cutoffMts.

    Args:
      notes: Input DataFrame containing creation times.
      noteStatusHistory: Input DataFrame containing creation times.
      cutoffMts: Allowable creation window measured in milliseconds.
    """
    # Validate that "notes" contains a subset of noteStatusHistory.
    assert notes[c.noteIdKey].nunique() == len(notes), "notes contains duplicate noteIds"
    assert noteStatusHistory[c.noteIdKey].nunique() == len(
      noteStatusHistory
    ), "noteStatusHistory contains duplicate noteIds"
    assert len(notes) == len(
      noteStatusHistory[[c.noteIdKey, c.createdAtMillisKey]].merge(
        notes[[c.noteIdKey, c.createdAtMillisKey]],
        on=[c.noteIdKey, c.createdAtMillisKey],
        how="inner",
      )
    ), "notes is not a subset of noteStatusHistory"
    threshold = c.epochMillis - cutoffMts
    return noteStatusHistory[noteStatusHistory[c.createdAtMillisKey] > threshold][[c.noteIdKey]]
Return DataFrame containing notes authored within cutoffMts.

    Args:
      notes: Input DataFrame containing creation times.
      noteStatusHistory: Input DataFrame containing creation times.
      cutoffMts: Allowable creation window measured in milliseconds.
    
sourcecode/scoring/pflip_model.py