code: def test_base_axes_exceptions():
      """Tests for exceptions raised by class ``BaseAxes``."""
      axes = BaseAxes(None, "foo", 3)
      # Constructor doesn't raise for invalid direction
      assert axes.direction == "foo"
      assert axes.coord == 3
      with pytest.raises(
          NotImplementedError, match="'transform_to_2d' needs to be"
      ):
          axes.transform_to_2d(None, None)
      with pytest.raises(
          NotImplementedError, match="'draw_position' should be"
      ):
          axes.draw_position(None, None)
      with pytest.raises(
          ValueError, match="Invalid value for direction"
      ):
          axes.draw_2d(None, None, None)
  
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  import pytest
  from nibabel import Nifti1Image
  from nilearn.datasets import load_mni152_template
  from nilearn.plotting.displays import BaseAxes, LProjector, LRProjector, LYRProjector, LYRZProjector, LZRProjector, LZRYProjector, MosaicSlicer, OrthoProjector, OrthoSlicer, RProjector, TiledSlicer, XProjector, XSlicer, XZProjector, XZSlicer, YProjector, YSlicer, YXProjector, YXSlicer, YZProjector, YZSlicer, ZProjector, ZSlicer
label_desc: Use image node_id 1 for calling a global function with example usage: test_base_axes_exceptions() without return types