def METHOD_NAME(mock_current_time):
    with mock.patch(
        "paasta_tools.check_spark_jobs.datetime", autospec=True
    ) as mock_time:
        mock_time.datetime.now.return_value = mock_current_time
        mock_time.datetime.fromtimestamp = datetime.datetime.fromtimestamp
        mock_time.timedelta = datetime.timedelta
        yield mock_time