def get_data_byte_at_index(data, byte_index):
    """
    Get the data at a given byte position.

    Given a data value that may require more than 8 bits to represent in
    unsigned binary, return the value of the data in the byte at the 
    given index. If the data doesn't extend into the byte index
    requested, the space is filled with zeroes. The index starts at 0
    and increases from right to left (or least to most signifcant bit).

    Args:
        data (int): The bit pattern of data (as an int) to get 8 bits
            (a byte) from
        byte_index (int): The index of the byte you want to retrieve.
    Returns:
        int: The bit pattern (as an 8 bit unsigned int) of the byte of
        data at the given byte index.

    """

    # Shift by desired amount and extract least significant byte
    shifted = data >> (byte_index * 8)
    res = shifted & 0b11111111

    return res