code: def path_order (x, y):
      
      if x == y:
          return 0
  
      xg = get_grist (x)
      yg = get_grist (y)
  
      if yg and not xg:
          return -1
  
      elif xg and not yg:
          return 1
  
      else:
          if not xg:
              x = feature.expand_subfeatures([x])
              y = feature.expand_subfeatures([y])
  
          if x < y:
              return -1
          elif x > y:
              return 1
          else:
              return 0
docs: Helper for as_path, below. Orders properties with the implicit ones
          first, and within the two sections in alphabetical order of feature
          name.