code: def is_not_none(
      val: Optional[Any], reason: Optional[str] = None
  ) -> None:
      if val is not None:
          return
  
      msg = "CHECK FAILED! Got {}, expected non-None".format(val)
      if reason is not None:
          msg += ": {}".format(reason)
  
      raise CheckFailedError(msg)
  
imports: from typing import Any, Container, Optional, Sized, Tuple, Type, Union
label_desc: Use image node_id 7 for calling a global function with example usage: is_not_none(val, reason) without return types