code: def _canonicalize(self, filename):
          
          path, ext = os.path.splitext(filename)
          if not ext:
              ext = ".collection"
          return path + ext
docs: Use .collection as extension unless provided