""" I want to implement this in prefect.Task """
    def get_direct_dependencies(self) -> Dict[str, "Task"]:
        """ Returns a dictionary of {task_arg_name: upstream Task object} """
        flow = prefect.context.get("flow", None)
        # flow.upstream_tasks(self) only gives us the set of tasks
		# Flow.all_upstream_edges()[self] only gives us the set of edges
        # How to follow the upstream edges to construct this dictionary?
        return task_dependencies

""" to be used in TaskScheduler with this run method """
async def run(self, task: Task) -> List[Future]:
        """ Takes in Task. Returns list of Futures (from slurm-like scheduler). """
        logging.info(f"In TaskScheduler.run(task) with name {task.name}, {task.slug}")

        # Dictionary of kwarg-name:val
        task_dependencies = [(k,v) for k, v in task.get_direct_dependencies().items()]

        # Runs each task dependency and waits
        futures = [self.run(dep) for (_, dep) in task_dependencies if isinstance(dep, Task)]
        await asyncio.gather(*futures)

        # Get task inputs into kwargs, from results of upstream task futures
        kwargs = {task_dependencies[i][0]: futures[i].result for i in range(len(task_dependencies))
        task_futures = task.run(**kwargs)
        return task_futures