code: def xla_launch(fn, strategy=None):
      # TODO: the accelerator should be optional to just launch processes, but this requires lazy initialization
      if not strategy:
          accelerator = XLAAccelerator()
          strategy = XLAStrategy(
              accelerator=accelerator,
              parallel_devices=XLAAccelerator.get_parallel_devices(
                  XLAAccelerator.auto_device_count()
              ),
          )
      launcher = _XLALauncher(strategy=strategy)
      wrapped = partial(wrap_launch_function, fn, strategy)
      return launcher.launch(wrapped, strategy)
  
imports: import os
  from functools import partial
  from unittest import mock
  from unittest.mock import ANY, MagicMock, Mock
  import pytest
  import torch
  from lightning.fabric.accelerators.xla import _XLA_GREATER_EQUAL_2_1, XLAAccelerator
  from lightning.fabric.strategies import XLAStrategy
  from lightning.fabric.strategies.launchers.xla import _XLALauncher
  from lightning.fabric.utilities.distributed import ReduceOp
  from lightning.fabric.utilities.seed import seed_everything
  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 2 for calling a global function with example usage: xla_launch(fn, strategy) and returns: launcher