def team_bikes(team, include_reserve=False, include_inactive=False):
    """ List bikes for given team. 
    Optionally include reserve and inactive bikes.
    """
    bikes = team.bikes.all()
    if not include_inactive:
        bikes = bikes.filter(active=True)
    if not include_reserve:
        bikes = bikes.filter(reserve=False)
    return bikes