def stringbytes(elems: list) -> list:
    """Chain bytes() instances next to each other in elems together.
    """
    out = []
    while len(elems) > 0:
        elem = elems.pop(0)
        while isinstance(elem, bytes) and len(elems) > 0 and isinstance(elems[0], bytes):
            elem += elems.pop(0)
        out.append(elem)
    return out