code: def test_version_2_0():
      f = BytesIO()
      # requires more than 2 byte for header
      dt = [(("%d" % i) * 100, float) for i in range(500)]
      d = np.ones(1000, dtype=dt)
  
      format.write_array(f, d, version=(2, 0))
      with warnings.catch_warnings(record=True) as w:
          warnings.filterwarnings("always", "", UserWarning)
          format.write_array(f, d)
          assert_(w[0].category is UserWarning)
  
      # check alignment of data portion
      f.seek(0)
      header = f.readline()
      assert_(len(header) % format.ARRAY_ALIGN == 0)
  
      f.seek(0)
      n = format.read_array(f, max_header_size=200000)
      assert_array_equal(d, n)
  
      # 1.0 requested but data cannot be saved this way
      assert_raises(ValueError, format.write_array, f, d, (1, 0))
  
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 16 for calling a global function with example usage: test_version_2_0() without return types