@staticmethod
    def select_step_with_status(status, steps):
        for step in steps:
            assert isinstance(step, Step), \
                "TYPE-MISMATCH: step.class=%s"  % step.__class__.__name__
            if step.status == status:
                return step
        # -- OTHERWISE: No step with the given status found.
        # KeyError("Step with status={0} not found".format(status))
        return None
Helper function to find the first step that has the given step.status.
dataset/ETHPy150Open behave/behave/behave/reporter/junit.py/JUnitReporter.select_step_with_status