code: def test_en_easy_hard(
      caplog,
      en_doc_easy,
      en_doc_hard,
      name,
      exp_easy,
      exp_hard,
      warns_lang,
  ):
      func = getattr(readability, name)
      obs_easy = func(en_doc_easy)
      obs_hard = func(en_doc_hard)
      assert obs_easy == pytest.approx(exp_easy, abs=1.0)
      assert obs_hard == pytest.approx(exp_hard, abs=1.0)
      assert (
          "but this readability statistic is intended for use on"
          in caplog.text
      ) == warns_lang
  
file_path: textacy/tests/text_stats/test_readability.py
imports: from contextlib import nullcontext
  import pytest
  import textacy
  from textacy.text_stats import readability
label_desc: Use image node_id 4 for calling a global function with example usage: test_en_easy_hard(caplog, en_doc_easy, en_doc_hard, name, exp_easy, exp_hard, warns_lang) without return types