human
Complete the below
def games_gen(year, week=None, home=None, away=None, kind='REG', started=False):

    ''''games returns a generator of all games matching the given criteria. Each
    game can then be queried for player statistics and information about
    the game itself (score, winner, scoring plays, etc.).
    As a special case, if the home and away teams are set to the same team,
    then all games where that team played are returned.
    The kind parameter specifies whether to fetch preseason, regular season
    or postseason games. Valid values are PRE, REG and POST.
    The week parameter is relative to the value of the kind parameter, and
    may be set to a list of week numbers.
    In the regular season, the week parameter corresponds to the normal
    week numbers 1 through 17. Similarly in the preseason, valid week numbers
    are 1 through 4. In the post season, the week number corresponds to the
    numerical round of the playoffs. So the wild card round is week 1,
    the divisional round is week 2, the conference round is week 3
    and the Super Bowl is week 4.
    The year parameter specifies the season, and not necessarily the actual
    year that a game was played in. For example, a Super Bowl taking place
    in the year 2011 actually belongs to the 2010 season. Also, the year
    parameter may be set to a list of seasons just like the week parameter.
    Note that if a game\'s JSON data is not cached to disk, it is retrieved
    from the NFL web site. A game\'s JSON data is *only* cached to disk once
    the game is over, so be careful with the number of times you call this
    while a game is going on. (i.e., don\'t piss off NFL.com.)
    If started is True, then only games that have already started (or are
    about to start in less than 5 minutes) will be returned. Note that the
    started parameter requires pytz to be installed. This is useful when
    you only want to collect stats from games that have JSON data available
    (as opposed to waiting for a 404 error from NFL.com).'
    '''
 What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    infos = _search_schedule(year, week, home, away, kind, started)
    if (not infos):
        return None
    def gen():
        for info in infos:
            g = nflgame.game.Game(info['eid'])
            if (g is None):
                continue
            (yield g)
    return gen()