code: func (pe PathExpression) popOneLastLeg() (PathExpression, pathLeg) {
  	lastLegIdx := len(pe.legs) - 1
  	lastLeg := pe.legs[lastLegIdx]
  	// It is used only in modification, it has been checked that there is no asterisks.
  	return PathExpression{legs: pe.legs[:lastLegIdx]}, lastLeg
  }
docs: // popOneLastLeg returns the a parent PathExpression and the last pathLeg