code: def test_inserting_layers():
      class as_first_layer:
          def __init__(self, obj):
              self.obj = obj
  
          def __radd__(self, plot):
              plot.layers.insert(0, self.obj.to_layer())
              return plot
  
          def __rsub__(self, plot):
              return self.__radd__(plot)
  
      p = (
          ggplot(data, aes("x", "y"))
          + geom_point(size=4)
          + as_first_layer(geom_point(color="cyan", size=8))
          - as_first_layer(geom_point(color="red", size=12))
      )
  
      assert p == "inserting_layers"
  
file_path: plotnine/tests/test_layers.py
imports: from pathlib import Path
  import numpy
  import pandas
  import pytest
  from plotnine import aes, geom_path, geom_point, ggplot
  from plotnine.exceptions import PlotnineError, PlotnineWarning
  from plotnine.layer import Layers, layer
label_desc: Use image node_id 2 for calling a global function with example usage: test_inserting_layers() and returns: plot, self