from typing import IO


def _read_bytes(io: IO, i: int, n: int) -> bytes:
    """
    Read a section of bytes.

    :param io: The IO stream to read bytes from
    :param i: The position of the first byte to read
    :param n: The number of bytes to read
    :return: The bytes
    """
    io.seek(i)
    return io.read(n)