code: def assert_prediction(job, **kwargs):
      assert (
          job.status == ExecutionStatus.Success
      ), "job should be successful"
      atol = kwargs.get("atol", 10e-8)
      rtol = kwargs.get("rtol", 10e-5)
      threshold = kwargs.get("threshold", 0.9)
      expected_value = kwargs["expected_value"]
      predictions = job.outputs["-p"]
      with open(predictions[0], "r") as f:
          prediction = [i.strip() for i in f.readlines()]
          prediction = [i for i in prediction if i != ""]
          if ":" in prediction[0]:
              prediction = [
                  [j.split(":")[1] for j in i.split(",")]
                  for i in prediction
              ]
          elif "," in prediction[0]:
              prediction = [
                  [j for j in i.split(",")] for i in prediction
              ]
          if type(prediction[0]) == list:
              prediction = [
                  [float(remove_non_digits(j)) for j in i]
                  for i in prediction
              ]
          else:
              prediction = [
                  float(remove_non_digits(i)) for i in prediction
              ]
          assert majority_close(
              prediction,
              [expected_value] * len(prediction),
              rtol=rtol,
              atol=atol,
              threshold=threshold,
          ), f"predicted value should be {expected_value}, \n actual values are {prediction}"
  
file_path: vowpal_wabbit/python/tests/e2e_v2/assert_job.py
imports: import numpy
  import os
  from numpy.testing import assert_allclose, assert_almost_equal
  from vw_executor.vw import ExecutionStatus
  import vowpalwabbit
  from test_helper import get_function_object, datagen_driver
label_desc: Use image node_id 5 for calling a global function with example usage: assert_prediction(job) without return types