code: def action(source, func):
      
      if asyncio.iscoroutinefunction(func):
          async def innerfunc(arg):
              await func(arg)
              return arg
      else:
          def innerfunc(arg):
              func(arg)
              return arg
      return map.raw(source, innerfunc)
docs: Perform an action for each element of an asynchronous sequence
      without modifying it.
  
      The given function can be synchronous or asynchronous.