def tiers_for_dev(dev):
 t1 = dev['region']
 t2 = dev['zone']
 t3 = dev['ip']
 t4 = dev['id']
 return ((t1,), (t1, t2), (t1, t2, t3), (t1, t2, t3, t4))

def tiers_for_dev ( dev ) : t1 = dev [ 'region' ] t2 = dev [ 'zone' ] t3 = dev [ 'ip' ] t4 = dev [ 'id' ] return ( ( t1 , ) , ( t1 , t2 ) , ( t1 , t2 , t3 ) , ( t1 , t2 , t3 , t4 ) )
returns a tuple of tiers for a given device in ascending order by length .