Given a string containing an absolute or relative path, return the correct normalized path (for example, ../var../logs should give ../logs). The function accepts a string path and returns a normalized string, removing redundant separators and . components, resolving .., and ignoring components that contain .. without being exactly ... For example, /a/./b/../c/ becomes /a/c, while a/../../b becomes ../b.
//.. performs parent-directory traversal/ as the separatordef normalize_path(path):