code: def _make_delegate_method(attr):
      async def method(self, *args, **kwargs):
          func = functools.partial(
              getattr(self._file, attr), *args, **kwargs
          )
          return await self._loop.run_in_executor(self._executor, func)
  
      return method
  
file_path: mars/mars/lib/aio/base.py
imports: import asyncio
  import functools
  from concurrent.futures import Executor
  from typing import Any, Type
label_desc: Use image node_id 1 for calling a global function with example usage: _make_delegate_method(attr) and returns: method, unknown