def int_to_byte(number: int, word_bytes_width: int=2, signed: bool=False
    ) ->bytes:
    """
    Convert an integer to a 16 bit byte string (2 bytes).

    :param number: the integer to be converted.
    :param word_bytes_width: length of word in bytes.
    :param signed: flag for signed and unsigned conversion.
    :return: a 16 bit (2 bytes) binary string.
    :rtype: bytes
    """
    return number.to_bytes(word_bytes_width, byteorder='big', signed=signed)
