Collections module reformatting and minor code refactoring (GH-20772)

1 file changed