code: def func(
      coroutine: Union[str, Function, Callable],
      *,
      name: Optional[str] = None,
      keep_result: Optional[SecondsTimedelta] = None,
      timeout: Optional[SecondsTimedelta] = None,
      max_tries: Optional[int] = None,
  ) -> Function:
      
      if isinstance(coroutine, Function):
          return coroutine
  
      if isinstance(coroutine, str):
          name = name or coroutine
          coroutine = import_string(coroutine)
  
      assert asyncio.iscoroutinefunction(coroutine), f'{coroutine} is not a coroutine function'
      timeout = to_seconds(timeout)
      keep_result = to_seconds(keep_result)
  
      return Function(name or coroutine.__qualname__, coroutine, timeout, keep_result, max_tries)
docs: Wrapper for a job function which lets you configure more settings.
  
      :param coroutine: coroutine function to call, can be a string to import
      :param name: name for function, if None, ``coroutine.__qualname__`` is used
      :param keep_result: duration to keep the result for, if 0 the result is not kept
      :param timeout: maximum time the job should take
      :param max_tries: maximum number of tries allowed for the function, use 1 to prevent retrying