'Method that actually wrapps the call to step definition
callback. Sends step object as first argument'

def __call__(self, *args, **kw):

    try:
        ret = self.function(self.step, *args, **kw)
        self.step.passed = True
    except Exception as e:
        self.step.failed = True
        self.step.why = ReasonToFail(self.step, e)
        raise
    return ret
