def METHOD_NAME(fd, sep=None, read_size=4096):
    """Iter over chunks of open file ``fd`` delimited by ``sep``. Doesn't trim."""
    buf = fd.read(read_size)
    is_str = isinstance(buf, str)
    part = "" if is_str else b""
    sep = sep or ("\n" if is_str else b"\n")
    while len(buf) > 0:
        part2, *items = buf.split(sep)
        *full, part = (part + part2, *items)  # type: ignore
        yield from full
        buf = fd.read(read_size)
    # won't yield an empty part if stream ended with `sep`
    # or if there was no data before EOF
    if len(part) > 0:  # type: ignore[arg-type]
        yield part