nl: or path is not contained in the value under the medium key of self._css dictionary. call the method self._css.setdefault with 2 arguments medium and an empty string, append path to the result.
code: self . _css . setdefault ( medium , [ ] ) . append ( path )