def METHOD_NAME(self, x):
    if isinstance(x, str):
        if not Path(x).exists() and (self.root / x).exists():
            return (self.root / x).as_posix()
    elif isinstance(x, dict):
        return {k: self.METHOD_NAME(v) for k, v in x.items()}
    return x