Replaces given portion of the byte string with the replacement, returns new array
    :param byte_str:
    :param start_idx:
    :param stop_idx:
    :param replacement:
    :return:

def bytes_replace(byte_str, start_idx, stop_idx, replacement):
    """
    Replaces given portion of the byte string with the replacement, returns new array
    :param byte_str:
    :param start_idx:
    :param stop_idx:
    :param replacement:
    :return:
    """
    return byte_str[:start_idx] + replacement + byte_str[stop_idx:]