def __getitem__(self, idx):
if not isinstance(idx, slice):<EOL><INDENT>i = adjust_index(idx)<EOL>return self.request('<STR_LIT>', i, i + <NUM_LIT:1>, True)[<NUM_LIT:0>]<EOL><DEDENT>start = adjust_index(idx.start, <NUM_LIT:0>)<EOL>end = adjust_index(idx.stop, -<NUM_LIT:1>)<EOL>return self.request('<STR_LIT>', start, end, False)<EOL>
Get a buffer line or slice by integer index.

        Indexes may be negative to specify positions from the end of the
        buffer. For example, -1 is the last line, -2 is the line before that
        and so on.

        When retrieving slices, omiting indexes(eg: `buffer[:]`) will bring
        the whole buffer.