code: def mask_factory(request):
      kind = request.param
  
      def factory(length):
          mask = pd.Series([False] * length)
          if kind == "MaskOdd":
              mask[0::2] = True
          elif kind == "MaskEven":
              mask[1::2] = True
          elif kind == "MaskNone":
              pass
          elif kind == "MaskAll":
              mask[:] = True
          return mask
  
      return factory
  
imports: import geopandas
  import numpy
  import pandas
  import pytest
  from shapely.affinity import rotate
  from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
label_desc: Use image node_id 13 for calling a global function with example usage: mask_factory(request) and returns: factory, mask