code: def test_get_nibabel_data():
      # Test getting directory
      local_data = realpath(pjoin(MY_DIR, "..", "..", "nibabel-data"))
      if isdir(local_data):
          assert nibd.get_nibabel_data() == local_data
      else:
          assert nibd.get_nibabel_data() == ""
      nibd.environ["NIBABEL_DATA_DIR"] = "not_a_path"
      assert nibd.get_nibabel_data() == ""
      nibd.environ["NIBABEL_DATA_DIR"] = MY_DIR
      assert nibd.get_nibabel_data() == MY_DIR
  
file_path: nibabel/nibabel/tests/test_nibabel_data.py
imports: import os
  from os.path import dirname, isdir
  from os.path import join
  from os.path import realpath
  from .None import nibabel_data
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_nibabel_data() without return types