code: def test_sanitize_path():
      path, is_remote = cp._sanitize_path("r:default-project", "/")
      assert path == "/default-project"
      assert is_remote
  
      path, _ = cp._sanitize_path("r:foo", "/default-project")
      assert path == "/default-project/foo"
  
      path, _ = cp._sanitize_path("foo", "/default-project")
      assert path == "foo"
  
file_path: pytorch-lightning/tests/tests_app/cli/test_cp.py
imports: import os
  import sys
  from pathlib import PosixPath
  from unittest.mock import MagicMock
  import pytest
  from lightning.app.cli.commands import cp
  from lightning.app.cli.commands.cd import _CD_FILE, cd
  from lightning_cloud.openapi import Externalv1Cluster, Externalv1LightningappInstance, V1CloudSpace, V1ClusterDriver, V1ClusterSpec, V1GetClusterResponse, V1KubernetesClusterDriver, V1LightningappInstanceArtifact, V1LightningappInstanceSpec, V1ListCloudSpacesResponse, V1ListClustersResponse, V1ListLightningappInstanceArtifactsResponse, V1ListLightningappInstancesResponse, V1ListMembershipsResponse, V1ListProjectClusterBindingsResponse, V1Membership, V1ProjectClusterBinding, V1UploadProjectArtifactResponse
label_desc: Use image node_id 3 for calling a global function with example usage: test_sanitize_path() without return types