code: def test_huge_header(tmpdir, mmap_mode):
      f = os.path.join(tmpdir, f"large_header.npy")
      arr = np.array(1, dtype="i," * 10000 + "i")
  
      with pytest.warns(UserWarning, match=".*format 2.0"):
          np.save(f, arr)
  
      with pytest.raises(ValueError, match="Header.*large"):
          np.load(f, mmap_mode=mmap_mode)
  
      with pytest.raises(ValueError, match="Header.*large"):
          np.load(f, mmap_mode=mmap_mode, max_header_size=20000)
  
      res = np.load(f, mmap_mode=mmap_mode, allow_pickle=True)
      assert_array_equal(res, arr)
  
      res = np.load(f, mmap_mode=mmap_mode, max_header_size=180000)
      assert_array_equal(res, arr)
  
imports: import sys
  import os
  import warnings
  import pytest
  from io import BytesIO
  import numpy
  from numpy.testing import assert_, assert_array_equal, assert_raises, assert_raises_regex, assert_warns, IS_PYPY, IS_WASM
  from numpy.testing._private.utils import requires_memory
  from numpy.lib import format
  import yatest.common
label_desc: Use image node_id 18 for calling a global function with example usage: test_huge_header(tmpdir, mmap_mode) without return types