def from_nibbles(bytes_, signed=False):
    """yield 4-bit nibble values in bytes_, low nibbles first

    (order example: nibbles(b'!Ce') yields the nibbles 1,2,3,4,5,6)

    bytes_: a bytes object OR a single int representing a single byte.
    signed: if True, nibbles are yielded as signed values,
        i.e. nibbles between [0x8 to 0xf] will yield respective values [-8 to -1]
    yields: integers in the range 0,15 for signed=False, -8,7 for signed=True
    """
    if not hasattr(bytes_, '__iter__'):
        bytes_ = bytes_,
    for b in bytes_:
        if signed:
            yield -(b & 8) + (b & 7)
            yield -(b >> 4 & 8) + (b >> 4 & 7)
        else:
            yield b & 15
            yield b >> 4 & 15
