<commit_before>def get_rounds(number):
    """Return a list of rounds that includes `number` and the next two."""
    return [number, number + 1, number + 2]


def concatenate_rounds(rounds1, rounds2):
    """Return a list of rounds that combines `rounds1` and `rounds2`."""
    return rounds1 + rounds2


def list_contains_round(rounds, number):
    """Return whether `rounds` includes the `number` round."""
    return number in rounds


def card_average(hand):
    """Return the average of the hand."""
    total = 0
    count = 0
    for card in hand:
      total += card
      count += 1
    return total / count


def approx_average_is_average(hand):
    """Return whether the average of the first and last card is the average."""
    return card_average([hand[0], hand[-1]]) == card_average(hand)


def average_even_is_average_odd(hand):
    """Return whether the average of the even cards is the same as that odd cards."""
    return card_average(hand[::2]) == card_average(hand[1::2])


def maybe_double_last(hand):
    """Double the value of the last card if it is a Jack (11)."""
    if hand[-1] == 11:
      hand[-1] *= 2<commit_msg>Added formal docstrings to exemplar file and corrected code errors.<commit_after>def get_rounds(number):
    '''

     :param number: int - current round number.
     :return: list - current round and the two that follow.
    '''

    return [number, number + 1, number + 2]


def concatenate_rounds(rounds_1, rounds_2):
    '''

    :param rounds_1: list - first rounds played.
    :param rounds_2: list - second set of rounds played.
    :return: list - all rounds played.
    '''

    return rounds1 + rounds2


def list_contains_round(rounds, number):
    '''

    :param rounds: list - rounds played.
    :param number: int - round number.
    :return:  bool - was the round played?
    '''

    return number in rounds


def card_average(hand):
    '''

    :param hand: list - cards in hand.
    :return:  int - average value of the cards in the hand.
    '''

    total = 0
    count = 0
    for card in hand:
      total += card
      count += 1
    return total / count


def approx_average_is_average(hand):
    '''

    :param hand: list - cards in hand.
    :return: int - approximate average value of the cards in the hand.
    '''

    return card_average([hand[0], hand[-1]]) == card_average(hand)


def average_even_is_average_odd(hand):
    '''

    :param hand: list - cards in hand.
    :return: int - approximate average value of the cards in the hand.
    '''

    return card_average(hand[::2]) == card_average(hand[1::2])


def maybe_double_last(hand):
    '''

    :param hand: list - cards in hand.
    :return: list - hand with Jacks (if present) value doubled.
    '''

    if hand[-1] == 11:
      hand[-1] *= 2
    return hand

{'fraction_non_alphanumeric': 0.11777301927194861, 'fraction_numerical': 0.015703069236259814, 'mean_word_length': 2.866206896551724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2227033', 'n_tokens_mistral': 901, 'n_tokens_neox': 830, 'n_words': 313}