<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _read(self, cmd, buffer, location, reader):
 """ Reads next op from the buffer or reader"""

        try:
            op = buffer[location]
            cmd.append(op)
            return op
        except IndexError:
            op = yield from reader.read(1)
            buffer.extend(op)
            cmd.append(buffer[location])
            return op