code: def test_year_check(dataframe):
      """Test inflation calculation fails with year outside valid range."""
      with pytest.raises(ValueError):
          assert dataframe.inflate_currency(
              "a", country="USA", currency_year=1950, to_year=2018
          )
  
file_path: pyjanitor/tests/finance/test_inflate_currency.py
imports: import pytest
  import requests
  from janitor.finance import _inflate_currency, inflate_currency
label_desc: Use image node_id 7 for calling a global function with example usage: test_year_check(dataframe) without return types