def siblingExtension(self, ext):
        """
        Attempt to return a path with my name, given the extension at C{ext}.

        @param ext: File-extension to search for.
        @type ext: L{bytes} or L{unicode}

        @return: The sibling path.
        @rtype: L{FilePath} with the same mode as the type of C{ext}.
        """
        ourPath = self._getPathAsSameTypeAs(ext)
        return self.clonePath(ourPath + ext)

        Attempt to return a path with my name, given the extension at C{ext}.

        @param ext: File-extension to search for.
        @type ext: L{bytes} or L{unicode}

        @return: The sibling path.
        @rtype: L{FilePath} with the same mode as the type of C{ext}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/filepath.py