code: def test_aes_inheritance():
      with pytest.raises(PlotnineError):
          p = (
              ggplot(data, aes("x", "y", yintercept="yintercept"))
              + geom_point()
              + geom_hline(size=2)
          )
          p.draw_test()
  
imports: import pandas
  import pytest
  from plotnine import aes, geom_hline, geom_point, ggplot
  from plotnine.exceptions import PlotnineError, PlotnineWarning
label_desc: Use image node_id 2 for calling a global function with example usage: test_aes_inheritance() without return types