def _game_is_active(gameinfo, inactive_interval):
 gametime = _game_datetime(gameinfo)
 now = _now()
 if (gametime >= now):
  return ((gametime - now).total_seconds() <= inactive_interval)
 return (gameinfo['eid'] not in _completed)

def _game_is_active ( gameinfo , inactive_interval ) : gametime = _game_datetime ( gameinfo ) now = _now ( ) if ( gametime >= now ) : return ( ( gametime - now ) . total_seconds ( ) <= inactive_interval ) return ( gameinfo [ 'eid' ] not in _completed )
returns true if the game is active .