code: def test_limits():
      p = (
          ggplot(data, aes("x"))
          + stat_function(
              fun=np.cos,
              size=2,
              color="blue",
              arrow=arrow(ends="first"),
          )
          + stat_function(
              fun=np.cos,
              xlim=(10, 20),
              size=2,
              color="red",
              arrow=arrow(ends="last"),
          )
      )
      assert p == "limits"
  
imports: import numpy
  import pandas
  import pytest
  from plotnine import aes, arrow, ggplot, stat_function
  from plotnine.exceptions import PlotnineError
label_desc: Use image node_id 1 for calling a global function with example usage: test_limits() without return types