code: def test_completion_perplexity_api():
      try:
          # litellm.set_verbose= True
          messages = [
              {"role": "system", "content": "You're a good bot"},
              {
                  "role": "user",
                  "content": "Hey",
              },
              {
                  "role": "user",
                  "content": "Hey",
              },
          ]
          response = completion(
              model="mistral-7b-instruct",
              messages=messages,
              api_base="https://api.perplexity.ai",
          )
          print(response)
      except Exception as e:
          pytest.fail(f"Error occurred: {e}")
  
imports: import sys, os
  import traceback
  from dotenv import load_dotenv
  import os, io
  import pytest
  import litellm
  from litellm import embedding, completion, completion_cost, Timeout
  from litellm import RateLimitError
  import openai
label_desc: Use image node_id 10 for calling a global function with example usage: test_completion_perplexity_api() without return types