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"]
      res = []
      with open(predictions[0], "r") as f:
          exampleRes = []
          while True:
              line = f.readline()
              if not line:
                  break
              if line.count(":") == 0:
                  res.append(exampleRes)
                  exampleRes = []
                  continue
              slotRes = [0] * line.count(":")
              slot = line.split(",")
              for i in range(len(slot)):
                  actionInd = int(slot[i].split(":")[0])
                  slotRes[i] = float(slot[actionInd].split(":")[1])
              exampleRes.append(slotRes)
  
          assert majority_close(
              res,
              [expected_value] * len(res),
              rtol=rtol,
              atol=atol,
              threshold=threshold,
          ), f"predicted value should be {expected_value}, \n actual values are {res}"
  
imports: from vw_executor.vw import ExecutionStatus
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: assert_prediction(job) without return types