import io


def read_bytes(n: int, reader: io.IOBase) -> bytes:
    """
    Reads the specified number of bytes from the reader. It raises an 
    `EOFError` if the specified number of bytes is not available.

    Parameters:
    - `n`: The number of bytes to read;
    - `reader`: The reader;

    Returns the bytes read.
    """
    buff = reader.read(n)
    if not isinstance(buff, bytes):
        raise ValueError('The reader is expected to return bytes.')
    if len(buff) != n:
        raise EOFError(f'Unable to read {n} bytes from the stream.')
    return buff