def METHOD_NAME():
    try:
        job = Mock()
        _check_job_status(
            job,
            {
                "TransformationJobStatus": "Failed",
                "FailureReason": "CapacityError: Unable to provision requested ML compute capacity",
            },
            "TransformationJobStatus",
        )
        assert False, "sagemaker.exceptions.CapacityError should have been raised but was not"
    except Exception as e:
        assert type(e) == sagemaker.exceptions.CapacityError
        assert e.actual_status == "Failed"
        assert "Completed" in e.allowed_statuses
        assert "Stopped" in e.allowed_statuses