code: def test_idist_parallel_spawn_params_xla():
      res = idist.Parallel._setup_spawn_params(
          nproc_per_node=8,
          nnodes=None,
          node_rank=None,
          master_addr=None,
          master_port=None,
          start_method="fork",
      )
      assert "nproc_per_node" in res and res["nproc_per_node"] == 8
      assert "start_method" in res and res["start_method"] == "fork"
  
      with idist.Parallel(
          backend="xla-tpu", nproc_per_node=8, start_method="fork"
      ) as parallel:
          assert parallel.backend == "xla-tpu"
          res = parallel._spawn_params
          assert "nproc_per_node" in res and res["nproc_per_node"] == 8
          assert "start_method" in res and res["start_method"] == "fork"
  
imports: import os
  import subprocess
  import sys
  from pathlib import Path
  import pytest
  import torch
  from packaging.version import Version
  import ignite.distributed
  from ignite.distributed.utils import has_hvd_support, has_native_dist_support, has_xla_support
label_desc: Use image node_id 18 for calling a global function with example usage: test_idist_parallel_spawn_params_xla() without return types