def is_emerging_writer(scoredNotes: pd.DataFrame):
  """
  A function that checks if a user is an emerging writer. Emerging writers have a
  high helpfulness scores over a number of ratings in the last 28 days.
  Args:
      scoredNotes (pd.DataFrame): scored notes
  Returns:
    pd.DataFrame: emergingWriter The contributor scores with enrollments
  """
  authorCounts = author_helpfulness(scoredNotes, c.coreNoteInterceptKey)
  raterCounts = scoredNotes.groupby(c.noteAuthorParticipantIdKey).sum(numeric_only=True)[
    [c.numRatingsLast28DaysKey]
  ]
  emergingWriter = (
    authorCounts.join(raterCounts, how="outer", lsuffix="_author", rsuffix="_rater")
    .reset_index()
    .rename({"index": c.noteAuthorParticipantIdKey}, axis=1)
  )
  emergingWriter[c.isEmergingWriterKey] = False
  emergingWriter.loc[
    (emergingWriter[c.meanNoteScoreKey] > c.emergingMeanNoteScore)
    & (emergingWriter[c.numRatingsLast28DaysKey] >= c.emergingRatingCount),
    c.isEmergingWriterKey,
  ] = True
  return emergingWriter[[c.noteAuthorParticipantIdKey, c.isEmergingWriterKey]]

  A function that checks if a user is an emerging writer. Emerging writers have a
  high helpfulness scores over a number of ratings in the last 28 days.
  Args:
      scoredNotes (pd.DataFrame): scored notes
  Returns:
    pd.DataFrame: emergingWriter The contributor scores with enrollments
  
sourcecode/scoring/contributor_state.py