code: def test_loops_state_dict_structure():
      trainer = Trainer()
      state_dict = trainer._checkpoint_connector._get_loops_state_dict()
      expected = {
          "fit_loop": {
              "state_dict": {},
              "epoch_loop.state_dict": {"_batches_that_stepped": 0},
              "epoch_loop.batch_progress": {
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "is_last_batch": False,
              },
              "epoch_loop.scheduler_progress": {
                  "total": {"ready": 0, "completed": 0},
                  "current": {"ready": 0, "completed": 0},
              },
              "epoch_loop.manual_optimization.state_dict": {},
              "epoch_loop.manual_optimization.optim_step_progress": {
                  "total": {"ready": 0, "completed": 0},
                  "current": {"ready": 0, "completed": 0},
              },
              "epoch_loop.automatic_optimization.state_dict": {},
              "epoch_loop.automatic_optimization.optim_progress": {
                  "optimizer": {
                      "step": {
                          "total": {"ready": 0, "completed": 0},
                          "current": {"ready": 0, "completed": 0},
                      },
                      "zero_grad": {
                          "total": {
                              "ready": 0,
                              "started": 0,
                              "completed": 0,
                          },
                          "current": {
                              "ready": 0,
                              "started": 0,
                              "completed": 0,
                          },
                      },
                  },
              },
              "epoch_loop.val_loop.state_dict": {},
              "epoch_loop.val_loop.batch_progress": {
                  # number of batches across validation runs per epoch across dataloaders
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  # number of batches for this validation run across dataloaders
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "is_last_batch": False,
              },
              "epoch_progress": {
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
              },
          },
          "validate_loop": {
              "state_dict": {},
              "batch_progress": {
                  # total batches run by `validate` across dataloaders
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  # number of batches run by this `validate` call across dataloaders
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "is_last_batch": False,
              },
          },
          "test_loop": {
              "state_dict": {},
              "batch_progress": {
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "is_last_batch": False,
              },
          },
          "predict_loop": {
              "state_dict": {},
              "batch_progress": {
                  "total": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
                  "current": {
                      "ready": 0,
                      "started": 0,
                      "processed": 0,
                      "completed": 0,
                  },
              },
          },
      }
      assert state_dict == expected
  
label_desc: Use image node_id 2 for calling a global function with example usage: test_loops_state_dict_structure() without return types