def common(self, other):
        """Return the common part shared with the other path
        or None if there is no common part.
        """
        last = None
        for x, y in zip(self.parts(), other.parts()):
            if x != y:
                return last
            last = x
        return last
Return the common part shared with the other path
        or None if there is no common part.
        
src/_pytest/_py/path.py