def split_nb_bytes(binary_input, precision):
    """Given a binary input and a precision,
    calculates the number of bytes necessary to encode a number with said
    precision. It then uses this to split the binary input and return a tuple
    with the first element containing the binary string encoded number,
    and the second element containing the rest of the binary input.

    Args:
        binary_input (bytes): the binary_input that starts with an encoded
                                UonNumeric.
        precision (int): precision of the encoded number

    Returns:
        tuple: a tuple with the first element the encoded number
                and the second element is the rest of the binary
    """
    number_of_bytes = int(precision/8)
    return binary_input[:number_of_bytes], binary_input[number_of_bytes:]