code: def compile_model(device, data):
      module = SimpleModule().to(device)
      x = torch.randn((4, 4), device=device)
      inputs = (x,)
      # make batch dimension
      batch_dim = Dim("batch", min=1, max=1024)
      dynamic_shapes = {
          "x": {0: batch_dim},
      }
      with torch.no_grad():
          # aot-compile the module into a .so pointed by lib_path
          lib_path = torch._export.aot_compile(
              module, inputs, dynamic_shapes=dynamic_shapes
          )
      script_module = make_script_module(lib_path, device, *inputs)
      aoti_script_model = f"script_model_{device}.pt"
      script_module.save(aoti_script_model)
  
      # save sample inputs and ref output
      with torch.no_grad():
          ref_output = module(*inputs)
      data.update(
          {
              f"inputs_{device}": list(inputs),
              f"outputs_{device}": [ref_output],
          }
      )
  
file_path: pytorch/test/cpp/aot_inductor/compile_model.py
imports: import torch
  from torch.export import Dim
label_desc: Use image node_id 2 for calling a global function with example usage: compile_model(device, data) without return types