(action_note, stat_dict, key=None)
return stat_dict
Determines whether the note played was in key, and updates a stat dict.

  Args:
    action_note: An integer representing the chosen action.
    stat_dict: A dictionary containing fields for statistics about
      compositions.
    key: The numeric values of notes belonging to this key. Defaults to
      C-major if not provided.
  Returns:
    A dictionary of composition statistics with 'notes_not_in_key' field
    updated.
Determines whether the note played was in key, and updates a stat dict.
Determines whether the note played was in key and updates a stat dict .
def add_in_key_stat(action_note, stat_dict, key=None):
  """Determines whether the note played was in key, and updates a stat dict.

  Args:
    action_note: An integer representing the chosen action.
    stat_dict: A dictionary containing fields for statistics about
      compositions.
    key: The numeric values of notes belonging to this key. Defaults to
      C-major if not provided.
  Returns:
    A dictionary of composition statistics with 'notes_not_in_key' field
    updated.
  """
  if key is None:
    key = rl_tuner_ops.C_MAJOR_KEY

  if action_note not in key:
    stat_dict['notes_not_in_key'] += 1

  return stat_dict
def add_in_key_stat ( action_note , stat_dict , key = None ) : if key is None : key = rl_tuner_ops . C_MAJOR_KEY if action_note not in key : stat_dict [ 'notes_not_in_key' ] += 1 return stat_dict