code: def get_supervisor(func: types.AnyFunction) -> types.Supervisor:
      
      if not callable(func):
          raise TypeError("func is not callable")
      if asyncio.iscoroutinefunction(func):
          supervisor = _async_supervisor
      else:
          supervisor = _sync_supervisor
      return functools.partial(supervisor, func)
docs: Get the appropriate supervisor to use and pre-apply the function.
  
      Args:
          func: A function.