def end(self, session):
    self._last_step = None
    for m in self._monitors:
        if ('session' in inspect.getargspec(m.end).args):
            m.end(session=session)
        else:
            m.end()
def end(self, session):
    self._last_step = None
    for m in self._monitors:
        if ('session' in inspect.getargspec(m.end).args):
            m.end(session=session)
        else:
            m.end()