code: def test_multithreading_enabled_preserves_flag():
      arr = np.empty((1,), dtype=object)
      arr.flags.writeable = False
  
      # set_first_element cannot change the input array
      with pytest.raises(ValueError):
          set_first_element(42, arr)
  
      # writable flag goes to original state
      assert not arr.flags.writeable
  
imports: import os
  import sys
  from itertools import chain
  from string import ascii_letters, digits
  from unittest import mock
  import numpy
  import pytest
  import shapely
  from shapely.decorators import multithreading_enabled, requires_geos
label_desc: Use image node_id 14 for calling a global function with example usage: test_multithreading_enabled_preserves_flag() without return types