code: def _raise(
      exception_type: Type[Exception] = RuntimeError,
      msg: Optional[str] = None,
  ):
      def _raise_exception(*args, **kwargs):
          raise exception_type(msg)
  
      return _raise_exception
  
imports: import pytest
  from typing import Optional, Type
  from ray.air.execution._internal.barrier import Barrier
label_desc: Use image node_id 1 for calling a global function with example usage: _raise(exception_type, msg) and returns: _raise_exception