code: def raises_remote(etype):
      if isinstance(etype, str):
          # allow Exception or 'Exception'
          expected_ename = etype
      else:
          expected_ename = etype.__name__
  
      try:
          try:
              yield
          except error.AlreadyDisplayedError as e:
              e.original_error.raise_exception()
          except error.CompositeError as e:
              e.raise_exception()
      except error.RemoteError as e:
          assert (
              expected_ename == e.ename
          ), f"Should have raised {expected_ename}, but raised {e.ename}"
  
      else:
          pytest.fail("should have raised a RemoteError")
  
imports: import os
  import signal
  import sys
  import time
  import warnings
  from contextlib import contextmanager
  import pytest
  import zmq
  from decorator import decorator
  from ipyparallel import Client, error
  from ipyparallel.tests import add_engines, launchers
label_desc: Use image node_id 8 for calling a global function with example usage: raises_remote(etype) without return types