def secondary_sort(attr: str, side_of_ball: str) -> tuple:
    """
    Determine the secondary sort attribute and order when the
    primary sort attribute has the same value.

    Args:
        attr (str): The primary sort attribute
        side_of_ball (str): Offense or defense

    Returns:
        tuple: Secondary sort attribute and sort order
    """
    if attr == 'points_per_game':
        secondary_attr = 'games'

    elif attr in ['points', 'relative_points_per_game']:
        secondary_attr = 'points_per_game'

    else:
        secondary_attr = attr

    return secondary_attr, side_of_ball == 'offense'