Is there a way to rename all keys in a HighLevelGraph?

Given a mapping from old names to new names, how can I rename all task keys in the graph?

I tried renaming keys in hlg.keys(), but am not sure how to then create a new HighLevelGraph from that.

Hi @AdeelH, welcome to Dask Discourse forum!

I don’t think I understand what you are trying to do or why you’d want to do something like that. Would it be possible to give a MVCE and more explanations on the context?