code: def test_memory_sharing_disabled(strategy):
      """Test that the multiprocessing launcher disables memory sharing on model parameters and buffers to avoid race
      conditions on model updates."""
      tensor = torch.rand(4)
      model = SimpleModel()
      assert not tensor.is_shared()
      assert not model.layer.weight.is_shared()
      assert (
          model.layer.weight.data_ptr()
          == model.tied_layer.weight.data_ptr()
      )
  
      fabric = Fabric(accelerator="cpu", devices=2, strategy=strategy)
      fabric.launch(_test_memory_sharing_disabled, tensor, model)
  
file_path: pytorch-lightning/tests/tests_fabric/strategies/launchers/test_multiprocessing_integration.py
imports: import pytest
  import torch
  import torch.nn
  from lightning.fabric import Fabric
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: test_memory_sharing_disabled(strategy) without return types