'Chunks some data into chunks based on the current ASGI channel layer\'s
message size and reasonable defaults.
Yields (chunk, last_chunk) tuples.'

@classmethod
def chunk_bytes(cls, data):

    position = 0
    if (not data):
        (yield (data, True))
        return
    while (position < len(data)):
        (yield (data[position:(position + cls.chunk_size)], ((position + cls.chunk_size) >= len(data))))
        position += cls.chunk_size
