ordered set python time complexity