code: def test_morph_data():
      """Test IO of morphometry data file (eg. curvature)."""
      curv_path = pjoin(data_path, "surf", "lh.curv")
      curv = read_morph_data(curv_path)
      assert -1.0 < curv.min() < 0
      assert 0 < curv.max() < 1.0
      with InTemporaryDirectory():
          new_path = "test"
          write_morph_data(new_path, curv)
          curv2 = read_morph_data(new_path)
          assert np.array_equal(curv2, curv)
  
imports: import getpass
  import hashlib
  import os
  import struct
  import time
  import unittest
  from os.path import isdir
  from os.path import join
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from ...fileslice import strided_scalar
  from ...testing import clear_and_catch_warnings
  from ...tests.nibabel_data import get_nibabel_data, needs_nibabel_data
  from ...tmpdirs import InTemporaryDirectory
  from ..None import read_annot, read_geometry, read_label, read_morph_data, write_annot, write_geometry, write_morph_data
  from ..io import _pack_rgb
label_desc: Use image node_id 3 for calling a global function with example usage: test_morph_data() without return types