def is_earned_out(authorEnrollmentCounts: pd.DataFrame):
  """
  The author is at earned out when they have written 3+ CRNH notes of the last 5 notes. The user
  loses their ability to write notes once they acknowledge earn out. (EarnedOutAcknowledged) NewUser
  and EarnedOutAcknowledged states cannot transition to this state because they cannot
  write notes, and must first Earn in to Birdwatch.

  Args:
    authorEnrollmentCounts (pd.DataFrame): Scored Notes + User Enrollment status
  """
  return (
    (authorEnrollmentCounts[c.enrollmentState] != c.removed)
    & (authorEnrollmentCounts[c.enrollmentState] != c.newUser)
    & (authorEnrollmentCounts[c.enrollmentState] != c.earnedOutAcknowledged)
    & (authorEnrollmentCounts[c.notesCurrentlyRatedNotHelpful] > c.isAtRiskCRNHCount)
  )

  The author is at earned out when they have written 3+ CRNH notes of the last 5 notes. The user
  loses their ability to write notes once they acknowledge earn out. (EarnedOutAcknowledged) NewUser
  and EarnedOutAcknowledged states cannot transition to this state because they cannot
  write notes, and must first Earn in to Birdwatch.

  Args:
    authorEnrollmentCounts (pd.DataFrame): Scored Notes + User Enrollment status
  
sourcecode/scoring/contributor_state.py