code: def _add_resource_prefix(prefix: str, resource_path: str):
      if resource_path in prefix:
          return prefix
      prefix = os.path.join(resource_path, prefix)
      if not prefix.startswith("/"):
          prefix = "/" + prefix
      return prefix
  
imports: import contextlib
  import os
  import sys
  from contextlib import nullcontext
  from typing import Generator, List, Optional
  import click
  import lightning_cloud
  import rich
  from lightning_cloud.openapi import Externalv1LightningappInstance
  from rich.console import Console
  from rich.live import Live
  from rich.spinner import Spinner
  from rich.text import Text
  from lightning.app.cli.connect.app import _LIGHTNING_CONNECTION_FOLDER
  from lightning.app.utilities.app_helpers import Logger
  from lightning.app.utilities.cli_helpers import _error_and_exit
  from lightning.app.utilities.network import LightningClient
label_desc: Use image node_id 5 for calling a global function with example usage: _add_resource_prefix(prefix, resource_path) and returns: prefix, prefix