def calc_n_g(df_schedule, week):
    """Calculate list of games i.e. Ng

  Each row has home_id, away_id, home_total_points, away_total_points
  :param df_schedule: data frame with each matchup
  :param week: current matchup period id
  :return: list of games with team ids and scores for home/away
  """
    df_scores = df_schedule.query(
        f'matchupPeriodId <= {week} & winner!="UNDECIDED"')[['home_id',
        'away_id', 'home_total_points', 'away_total_points']]
    return df_scores
