code: def test_slope_inter(self):
      hdr = self.header_class()
      assert hdr.get_slope_inter() == (1.0, None)
      for in_tup, exp_err, out_tup, raw_slope in (
          ((2.0,), None, (2.0, None), 2.0),
          ((None,), None, (None, None), np.nan),
          ((1.0, None), None, (1.0, None), 1.0),
          # non zero intercept causes error
          ((None, 1.1), HeaderTypeError, (None, None), np.nan),
          ((2.0, 1.1), HeaderTypeError, (None, None), 2.0),
          # null scalings
          ((0.0, None), HeaderDataError, (None, None), 0.0),
          ((np.nan, np.nan), None, (None, None), np.nan),
          ((np.nan, None), None, (None, None), np.nan),
          ((None, np.nan), None, (None, None), np.nan),
          ((np.inf, None), HeaderDataError, (None, None), np.inf),
          ((-np.inf, None), HeaderDataError, (None, None), -np.inf),
          ((None, 0.0), None, (None, None), np.nan),
      ):
          hdr = self.header_class()
          if not exp_err is None:
              with pytest.raises(exp_err):
                  hdr.set_slope_inter(*in_tup)
              # raw set
              if not in_tup[0] is None:
                  hdr["scl_slope"] = in_tup[0]
          else:
              hdr.set_slope_inter(*in_tup)
              assert hdr.get_slope_inter() == out_tup
              # Check set survives through checking
              hdr = Spm99AnalyzeHeader.from_header(hdr, check=True)
              assert hdr.get_slope_inter() == out_tup
          assert_array_equal(hdr["scl_slope"], raw_slope)
  
imports: import itertools
  import unittest
  from io import BytesIO
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from ..optpkg import optional_package
  from ..casting import sctypes_aliases, shared_range, type_info
  from ..spatialimages import HeaderDataError
  from ..spm99analyze import HeaderTypeError, Spm99AnalyzeHeader, Spm99AnalyzeImage
  from ..testing import assert_allclose_safely, bytesio_filemap, bytesio_round_trip, suppress_warnings
  from ..volumeutils import _dt_min_max, apply_read_scaling
  from .None import test_analyze
label_desc: Use image node_id 3 for calling the TestSpm99AnalyzeHeader obj's underlying member method code with example usage: obj.test_slope_inter() without return types