code: async def ornot(func, *args, **kwargs):
      '''
      Calls func and awaits it if a returns a coroutine.
  
      Note:
          This is useful for implementing a function that might take a telepath proxy object or a local object, and you
          must call a non-async method on that object.
  
          This is also useful when calling a callback that might either be a coroutine function or a regular function.
      Usage:
          ok = await s_coro.ornot(maybeproxy.allowed, 'path')
      '''
  
      retn = func(*args, **kwargs)
      if iscoro(retn):
          return await retn
      return retync def ornot(func, *args, **kwargs):
      '''
      Calls func and awaits it if a returns a coroutine.
  
      Note:
          This is useful for implementing a function that might take a telepath proxy object or a local object, and you
          must call a non-async method on that object.
  
          This is also useful when calling a callback that might either be a coroutine function or a regular function.
      Usage:
          ok = await s_coro.ornot(maybeproxy.allowed, 'path')
      '''
  
      retn = func(*args, **kwargs)
      if iscoro(retn):
          return await retn
      return retn
docs: Calls func and awaits it if a returns a coroutine.
  
      Note:
          This is useful for implementing a function that might take a telepath proxy object or a local object, and you
          must call a non-async method on that object.
  
          This is also useful when calling a callback that might either be a coroutine function or a regular function.
      Usage:
          ok = await s_coro.ornot(maybeproxy.allowed, 'path')