code: def __posixpath_parents(pathname, root):
      parents = [posixpath.dirname(pathname)]
      root = posixpath.normpath(root)
      while parents[-1] != "/" and parents[-1] != root:
          parents.append(posixpath.dirname(parents[-1]))
      return parents
  
imports: import ftplib
  import posixpath
  from ftplib import FTP
  from unittest.mock import MagicMock
  import pytest
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.ftp_artifact_repo import FTPArtifactRepository
label_desc: Use image node_id 10 for calling a global function with example usage: __posixpath_parents(pathname, root) and returns: parents