code: def start_prediction(
      version_id,
      input_data,
      api_token,
      api_base,
      logging_obj,
      print_verbose,
  ):
      base_url = api_base
      if "deployments" in version_id:
          print_verbose(
              "\nLiteLLM: Request to custom replicate deployment"
          )
          version_id = version_id.replace("deployments/", "")
          base_url = (
              f"https://api.replicate.com/v1/deployments/{version_id}"
          )
          print_verbose(f"Deployment base URL: {base_url}\n")
  
      headers = {
          "Authorization": f"Token {api_token}",
          "Content-Type": "application/json",
      }
  
      initial_prediction_data = {
          "version": version_id,
          "input": input_data,
      }
  
      ## LOGGING
      logging_obj.pre_call(
          input=input_data["prompt"],
          api_key="",
          additional_args={
              "complete_input_dict": initial_prediction_data,
              "headers": headers,
              "api_base": base_url,
          },
      )
  
      response = requests.post(
          f"{base_url}/predictions",
          json=initial_prediction_data,
          headers=headers,
      )
      if response.status_code == 201:
          response_data = response.json()
          return response_data.get("urls", {}).get("get")
      else:
          raise ReplicateError(
              response.status_code,
              f"Failed to start prediction {response.text}",
          )
  
imports: import os, types
  import json
  import requests
  import time
  from typing import Callable, Optional
  from litellm.utils import ModelResponse, Usage
  import litellm
  import httpx
  from .prompt_templates.factory import prompt_factory, custom_prompt
label_desc: Use image node_id 1 for calling a global function with example usage: start_prediction(version_id, input_data, api_token, api_base, logging_obj, print_verbose) and returns: response_data