async def _get_file_path(self, client: httpx.AsyncClient, file_obj: Dict) -> str:
        """Get full path of file by recursively fetching parent folders."""
        path_parts = [file_obj.get("name", "")]
        file_id = file_obj.get("id", "unknown")

        logger.debug(f"Building path for file: {path_parts[0]} (ID: {file_id})")

        # Get parents from file object
        parents = file_obj.get("parents", [])
        if not parents:
            logger.debug(f"No parents found for file: {path_parts[0]}")
            return path_parts[0]

        # Start with the first parent
        current_parent_id = parents[0]
        logger.debug(f"Starting parent resolution with ID: {current_parent_id}")

        # Limit recursion depth to avoid potential infinite loops
        max_depth = 20
        depth = 0

        while current_parent_id and depth < max_depth:
            depth += 1
            try:
                # Get folder information
                folder_url = f"https://www.googleapis.com/drive/v3/files/{current_parent_id}"
                folder_params = {"fields": "id,name,parents,mimeType"}
                folder_data = await self._get_with_auth(client, folder_url, params=folder_params)

                # If this is the root folder or My Drive, stop recursion
                if folder_data.get("id") == "root" or not folder_data.get("parents"):
                    path_parts.insert(0, folder_data.get("name", "") or "My Drive")
                    break

                # Add folder name to path
                path_parts.insert(0, folder_data.get("name", ""))

                # Move to parent folder
                parents = folder_data.get("parents", [])
                current_parent_id = parents[0] if parents else None

            except Exception as e:
                logger.error(f"Error retrieving parent folder {current_parent_id}: {str(e)}")
                break

        # Build path string
        final_path = "/".join(path_parts)
        logger.debug(f"Final path for {file_id}: {final_path}")
        return final_path
Get full path of file by recursively fetching parent folders.
backend/airweave/platform/sources/google_drive.py