code: def _iscoroutinefunction(f):
      """Check if a callable is a coroutine function
      (either generator-style or async def)
      """
      if inspect.isgeneratorfunction(f):
          return True
      if hasattr(
          inspect, "iscoroutinefunction"
      ) and inspect.iscoroutinefunction(f):
          return True
      return False
  
imports: import time
  from contextlib import contextmanager
  import inspect
  import re
  import sys
  from textwrap import dedent
  from IPython.core import magic_arguments
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, no_var_expand
  import ipyparallel
  from ..None import error
label_desc: Use image node_id 2 for calling a global function with example usage: _iscoroutinefunction(f) and returns: False, True, True