code: def create_task(self, target: Callable[..., Any], *args: Any)\
              -> asyncio.tasks.Task:
          
          if asyncio.iscoroutine(target):
              task = self._loop.create_task(target)
          elif asyncio.iscoroutinefunction(target):
              task = self._loop.create_task(target(*args))
          else:
              raise ValueError("Expected coroutine as target")
          self._pending_tasks.append(task)
          return task
docs: Create task and add to our collection of pending tasks.