def from_c_bytes(c_data, c_data_len):
    """Takes a byte pointer and a length and converts it into a python bytes
    value.
    """
    # pylint: disable=invalid-slice-index
    return bytes(c_data[:c_data_len.value])