code: def test_fault_tolerant_symlink(mock_sleep):
      with TemporaryDirectory() as temp:
          src_fname = os.path.join(temp, "src")
          dst_fname = os.path.join(temp, "dst")
          _touch_file(src_fname, compressed=False, empty=False)
          # First symlink succeeds
          utils.fault_tolerant_symlink(src_fname, dst_fname)
          # Second symlink fails after retries (file exists)
          with pytest.raises(OSError):
              utils.fault_tolerant_symlink(src_fname, dst_fname)
          assert mock_sleep.called
          # Same data read from source and destination
          with utils.smart_open(src_fname) as src_in, utils.smart_open(
              dst_fname
          ) as dst_in:
              assert src_in.readlines() == dst_in.readlines()
  
imports: import gzip
  import math
  import os
  import re
  from tempfile import TemporaryDirectory
  import unittest
  import numpy
  import pytest
  import torch
  from sockeye import __version__
  from sockeye import constants
  from sockeye import utils
label_desc: Use image node_id 25 for calling a global function with example usage: test_fault_tolerant_symlink(mock_sleep) without return types