def METHOD_NAME(sdfg, dreport=None, repetitions = 30, print_report : bool = False):
    arguments = {}
    for cstate in sdfg.nodes():
        for dnode in cstate.data_nodes():
            array = sdfg.arrays[dnode.data]
            if array.transient:
                continue
            if dreport is not None:
                try:
                    data = dreport.get_first_version(dnode.data)
                    if data.shape != array.shape:
                        data = np.random.rand(*array.shape)
                    arguments[dnode.data] = dace.data.make_array_from_descriptor(array, data)
                except KeyError:
                    arguments[dnode.data] = dace.data.make_array_from_descriptor(array)
            else:
                arguments[dnode.data] = dace.data.make_array_from_descriptor(array, np.random.rand(*array.shape))
    try:
        with dace.config.set_temporary('debugprint', value=True):
            with dace.config.set_temporary('instrumentation', 'report_each_invocation', value=False):
                with dace.config.set_temporary('compiler', 'allow_view_arguments', value=True):
                    csdfg = sdfg.compile()
                    for _ in range(repetitions):
                        csdfg(**arguments)
                    csdfg.finalize()
    except Exception as e:
        return math.inf
    report = sdfg.get_latest_report()
    if print_report:
        print(report)
    durations = next(iter(next(iter(report.durations.values())).values()))
    return np.median(np.array(durations))