def lmask_byte(num_mask_bits,value):
    """
    This function applies a left-justified mask of a specified number of bits to an unsigned integer representing a single byte value.
    >>> lmask_byte(3,list(b'\\xff')[0])
    224
    >>> bin(224)
    '0b11100000'
    """
    return (((1<<(num_mask_bits))-1)<<(8-num_mask_bits)) & value