code: def test_bedrock_embedding_titan():
      try:
          # this tests if we support str input for bedrock embedding
          litellm.set_verbose = True
          litellm.enable_cache()
          import time
  
          current_time = str(time.time())
          # DO NOT MAKE THE INPUT A LIST in this test
          response = embedding(
              model="bedrock/amazon.titan-embed-text-v1",
              input=f"good morning from litellm, attempting to embed data {current_time}",  # input should always be a string in this test
          )
          print(f"response:", response)
          assert isinstance(
              response["data"][0]["embedding"], list
          ), "Expected response to be a list"
          print(
              f"type of first embedding:",
              type(response["data"][0]["embedding"][0]),
          )
          assert all(
              isinstance(x, float)
              for x in response["data"][0]["embedding"]
          ), "Expected response to be a list of floats"
  
          # this also tests if we can return a cache response for this scenario
          import time
  
          start_time = time.time()
  
          response = embedding(
              model="bedrock/amazon.titan-embed-text-v1",
              input=f"good morning from litellm, attempting to embed data {current_time}",  # input should always be a string in this test
          )
          print(response)
  
          end_time = time.time()
          print(
              f"Embedding 2 response time: {end_time - start_time} seconds"
          )
  
          assert end_time - start_time < 0.1
          litellm.disable_cache()
      except Exception as e:
          pytest.fail(f"Error occurred: {e}")
  
imports: import sys, os
  import traceback
  import pytest
  from dotenv import load_dotenv
  import openai
  import litellm
  from litellm import embedding, completion
label_desc: Use image node_id 8 for calling a global function with example usage: test_bedrock_embedding_titan() without return types