code: def _xla_fsdp_rewrap_warning(fabric: Fabric):
      """Fabric launch function for test_xla_fsdp_rewrap_warning."""
      from torch_xla.distributed.fsdp.xla_fully_sharded_data_parallel import (
          XlaFullyShardedDataParallel,
      )
  
      with fabric.init_module():
          model = torch.nn.Sequential(
              torch.nn.Linear(1, 1),
              torch.nn.ReLU(),
              XlaFullyShardedDataParallel(torch.nn.Linear(1, 1)),
          )
      if fabric.node_rank:
          with pytest.warns(match="submodule is already wrapped"):
              model = fabric.setup_module(model)
      else:
          model = fabric.setup_module(model)
      fabric.barrier("warning_check")
      assert not isinstance(
          model._forward_module[0], XlaFullyShardedDataParallel
      )
      assert not isinstance(
          model._forward_module[1], XlaFullyShardedDataParallel
      )
      assert isinstance(
          model._forward_module[2], XlaFullyShardedDataParallel
      )
  
file_path: pytorch-lightning/tests/tests_fabric/strategies/test_xla_fsdp_integration.py
imports: import os
  import re
  from pathlib import Path
  from unittest import mock
  import pytest
  import torch
  from lightning.fabric import Fabric
  from lightning.fabric.strategies import XLAFSDPStrategy
  from torch.utils.data import DataLoader
  from tests_fabric.helpers.models import RandomDataset
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: _xla_fsdp_rewrap_warning(fabric) without return types