code: def test_inference():
      lexicons_dir = Path(LIBRARY_ROOT) / "examples" / "absa"
      inference = SentimentInference(
          lexicons_dir / "aspects.csv",
          lexicons_dir / "opinions.csv",
          parse=False,
      )
      data_dir = (
          Path(LIBRARY_ROOT) / "tests" / "fixtures" / "data" / "absa"
      )
      for i in range(1, 4):
          with open(data_dir / "core_nlp_doc_{}.json".format(i)) as f:
              predicted_doc = inference.run(
                  parsed_doc=json.load(
                      f, object_hook=CoreNLPDoc.decoder
                  )
              )
          with open(data_dir / "sentiment_doc_{}.json".format(i)) as f:
              expected_doc = json.load(
                  f, object_hook=SentimentDoc.decoder
              )
          assert expected_doc == predicted_doc
  
imports: import json
  from pathlib import Path
  from nlp_architect import LIBRARY_ROOT
  from nlp_architect.common.core_nlp_doc import CoreNLPDoc
  from nlp_architect.models.absa.inference.data_types import SentimentDoc
  from nlp_architect.models.absa.inference.inference import SentimentInference
label_desc: Use image node_id 1 for calling a global function with example usage: test_inference() without return types