@classmethod
    def new_path(cls, path, item, paths, count):
        sanitizers = [sanitize_identifier, group_sanitizer, label_sanitizer]
        path = tuple(fn(p) for (p, fn) in zip(path, sanitizers))
        while any(path[:i] in paths or path in [p[:i] for p in paths]
                  for i in range(1,len(path)+1)):
            path = path[:2]
            pl = len(path)
            if (pl == 1 and not item.label) or (pl == 2 and item.label):
                new_path = path + (int_to_roman(count-1),)
                if path in paths:
                    paths[paths.index(path)] = new_path
                path = path + (int_to_roman(count),)
            else:
                path = path[:-1] + (int_to_roman(count),)
            count += 1
        return path, count
dataset/ETHPy150Open ioam/holoviews/holoviews/core/layout.py/Layout.new_path/original