def METHOD_NAME(self, buffer):
    if len(buffer) > 1:
        yield buffer[0]
        if len(buffer) == 3:
            yield buffer[1]
        elif len(buffer) > 2:
            yield "  [{} hidden frames]\n".format(len(buffer) - 2)
        yield buffer[len(buffer) - 1]
    elif len(buffer) > 0:
        yield buffer[len(buffer) - 1]
        pass