Heat the olive oil in a large pot and fry the onions just until translucent. Add the pastis or arak and leeks and continue frying. Add the diced celery and stir. Stir in the fennel pieces (and optional potato) and soften the vegetables at least 10 minutes. Add the stock and star anise and bring to a boil. Reduce heat to a gentle simmer and cook until all the vegetables are soft (about 40 minutes). Remove the star anise.
Drain the vegetables (keeping the liquids) and place in food processor or blend with a hand blender until smooth. Strain the puree to remove hard fiber bits.
Transfer the puree to the pot, adding the liquids as needed until achieving the desired consistency (I love creamy). Reheat and season with salt and white pepper to taste.
Garnish bowls of soup with toasted almonds or pine nuts and a drizzle of olive oil, or make a caramelized fennel garnish using the 2 fennels set aside. Slice them thinly and heat a large skillet with ¼ cup olive oil. Arrange the slices nicely in the skillet, sprinkle with 1 teaspoon brown sugar and a little salt, and begin to brown them over medium heat. When they are golden brown, turn and brown the other side. Set aside until serving the soup.