code: def __call__(self, func):
      mode_name_to_value = self.mode_name_to_value.copy()
      if not inspect.iscoroutinefunction(func):
          # sync
          @functools.wraps(func)
          def _inner(*args, **kwargs):
              with enter_mode(**mode_name_to_value):
                  return func(*args, **kwargs)
  
      else:
          # async
          @functools.wraps(func)
          async def _inner(*args, **kwargs):
              with enter_mode(**mode_name_to_value):
                  return await func(*args, **kwargs)
  
      return _inner
  
file_path: mars/mars/core/mode.py
imports: import functools
  import inspect
  import threading
  from ..config import options
label_desc: Use image node_id 4 for calling the _EnterModeFuncWrapper obj's underlying member method code with example usage: obj.__call__(func) and returns: _inner, func, unknown