[docs]defprint_import_time():""" Prints out the import time for the modules involved. """importtimedef_sys_in(mod):ifmodinsys.modules:print(f"{mod!r} already imported")####################_sys_in("onnx")begin=time.perf_counter()importonnxprint(f"time to import onnx --- {time.perf_counter()-begin}")####################_sys_in("onnx_array_api")begin=time.perf_counter()importonnx_array_apiprint(f"time to import onnx_array_api --- {time.perf_counter()-begin}")####################_sys_in("torch")begin=time.perf_counter()importtorchprint(f"time to import torch --- {time.perf_counter()-begin}")####################_sys_in("torch.export")begin=time.perf_counter()importtorch.exportprint(f"time to import torch.export --- {time.perf_counter()-begin}")####################_sys_in("onnxscript")begin=time.perf_counter()importonnxscriptprint(f"time to import onnxscript --- {time.perf_counter()-begin}")####################_sys_in("onnxruntime")begin=time.perf_counter()importonnxruntimeprint(f"time to import onnxruntime --- {time.perf_counter()-begin}")####################_sys_in("torch.onnx")begin=time.perf_counter()importtorch.onnxprint(f"time to import torch.onnx --- {time.perf_counter()-begin}")####################_sys_in("torch._dynamo")begin=time.perf_counter()importtorch._dynamoprint(f"time to import torch._dynamo --- {time.perf_counter()-begin}")#_sys_in("time to import experimental_experiment.torch_interpreter")begin=time.perf_counter()importexperimental_experiment.torch_interpreterprint(f"time to import experimental_experiment.torch_interpreter "f"--- {time.perf_counter()-begin}")#_sys_in("experimental_experiment.torch_interpreter.aten_functions")begin=time.perf_counter()importexperimental_experiment.torch_interpreter.aten_functionsprint(f"time to import experimental_experiment.torch_interpreter."f"aten_functions --- {time.perf_counter()-begin}")