code: def float8e5m2_to_float32(ival: int) -> Any:
      if ival < 0 or ival > 255:
          raise ValueError(f"{ival} is not a float8.")
      if ival in (255, 254, 253):
          return np.float32(-np.nan)
      if ival in (127, 126, 125):
          return np.float32(np.nan)
      if ival == 252:
          return -np.float32(np.inf)
      if ival == 124:
          return np.float32(np.inf)
      if (ival & 0x7F) == 0:
          return np.float32(0)
  
      sign = ival & 0x80
      ival &= 0x7F
      expo = ival >> 2
      mant = ival & 0x03
      powe = expo & 0x1F
      if expo == 0:
          powe -= 14
          fraction = 0
      else:
          powe -= 15
          fraction = 1
      fval = float(mant / 4 + fraction) * 2.0**powe
      if sign:
          fval = -fval
      return np.float32(fval)
  
imports: import unittest
  from typing import Any
  import numpy
  import parameterized
  import onnx
  from onnx import helper, numpy_helper
label_desc: Use image node_id 3 for calling a global function with example usage: float8e5m2_to_float32(ival) and returns: np, np, np, unknown, np, np