def _pad(word: str, max_len: int) ->bytes:
    """Pad a word out so the byte representation is max_len.

    Args:
        word: The word we are padding out and converting to binary
        max_len: How far to pad the string

    Returns:
        The word as bytes and extended.
    """
    byte_words = word.encode('utf-8')
    return byte_words + b' ' * (max_len - len(byte_words))
