so I am trying to understand the Tor path selection in more details especially for the entry guard. So i read in the path-spec.txt that there is a bandwidth weighted entry guard selection where the weights 'wgg', 'wgm' and 'wgd' come in place. From this I would assume that every relay can be chosen no matter the flag and I would just use a weighted random function to choose the entry guard. I then started to read the guard-spec which tells me that the relays with the guards flags will be narrowed down to a Sample set and then through filters and other constraints a set of primary guards will be chosen. Those primary guards will build the entry guard of every circuit for the client. I find this conflicting and I am probably misunderstanding something somewhere but I cannot figure it out. How are entry guards chosen for the circuits?