query_costs#

Compute a selection of costs for a bloq and its callees.

This function can be used to annotate a call graph diagram with multiple costs for each bloq. Specifically, the return value of this function can be used as the bloq_data argument to GraphvizCallGraph.

bloq

The bloq to seed the cost computation.

cost_keys

A sequence of CostKey that specifies which costs to compute.

generalizer

If provided, run this function on each bloq in the call graph to dynamically modify attributes. If the function returns None, the bloq is ignored in the cost computation. If a sequence of generalizers is provided, each generalizer will be run in order.