code: def canonical_path(path):
          
          return os.path.normcase(os.path.realpath(os.path.abspath(
              os.path.expanduser(path))))
docs: Return a normalized, canonical path to a file or folder.
  
          Removes all symbolic links encountered in the path to detect natural
          mail and maildir duplicates on the fly.