code: def ring_coding(array):
      
      # The codes will be all "LINETO" commands, except for "MOVETO"s at the
      # beginning of each subpath
      n = len(array)
      codes = np.ones(n, dtype=Path.code_type) * Path.LINETO
      codes[0] = Path.MOVETO
      codes[-1] = Path.CLOSEPOLY
      return codes
docs: Produces matplotlib Path codes for exterior and interior rings
      of a polygon geometry.