code: def test_embedding(client):
      try:
          litellm.set_verbose = False
          from litellm.proxy.utils import get_instance_fn
  
          my_custom_logger = get_instance_fn(
              value="custom_callbacks.my_custom_logger",
              config_file_path=python_file_path,
          )
          print("id of initialized custom logger", id(my_custom_logger))
          litellm.callbacks = [my_custom_logger]
          # Your test data
          print("initialized proxy")
          # import the initialized custom logger
          print(litellm.callbacks)
  
          # assert len(litellm.callbacks) == 1 # assert litellm is initialized with 1 callback
          print("my_custom_logger", my_custom_logger)
          assert my_custom_logger.async_success_embedding == False
  
          test_data = {
              "model": "azure-embedding-model",
              "input": ["hello"],
          }
          response = client.post(
              "/embeddings", json=test_data, headers=headers
          )
          print("made request", response.status_code, response.text)
          print(
              "vars my custom logger /embeddings",
              vars(my_custom_logger),
              "id",
              id(my_custom_logger),
          )
          assert (
              my_custom_logger.async_success_embedding == True
          )  # checks if the status of async_success is True, only the async_log_success_event can set this to true
          assert (
              my_custom_logger.async_embedding_kwargs["model"]
              == "azure-embedding-model"
          )  # checks if kwargs passed to async_log_success_event are correct
          kwargs = my_custom_logger.async_embedding_kwargs
          litellm_params = kwargs.get("litellm_params")
          metadata = litellm_params.get("metadata", None)
          print(
              "\n\n Metadata in custom logger kwargs",
              litellm_params.get("metadata"),
          )
          assert metadata is not None
          assert "user_api_key" in metadata
          assert "headers" in metadata
          proxy_server_request = litellm_params.get(
              "proxy_server_request"
          )
          model_info = litellm_params.get("model_info")
          assert proxy_server_request == {
              "url": "http://testserver/embeddings",
              "method": "POST",
              "headers": {
                  "host": "testserver",
                  "accept": "*/*",
                  "accept-encoding": "gzip, deflate",
                  "connection": "keep-alive",
                  "user-agent": "testclient",
                  "authorization": "Bearer sk-1234",
                  "content-length": "54",
                  "content-type": "application/json",
              },
              "body": {
                  "model": "azure-embedding-model",
                  "input": ["hello"],
              },
          }
          assert model_info == {
              "input_cost_per_token": 0.002,
              "mode": "embedding",
              "id": "hello",
          }
          result = response.json()
          print(f"Received response: {result}")
          print("Passed Embedding custom logger on proxy!")
      except Exception as e:
          pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")
  
file_path: litellm/litellm/tests/test_proxy_custom_logger.py
imports: import sys, os
  import traceback
  from dotenv import load_dotenv
  import os, io, asyncio
  import pytest
  import litellm
  from litellm import embedding, completion, completion_cost, Timeout
  from litellm import RateLimitError
  import importlib, inspect
  from fastapi.testclient import TestClient
  from fastapi import FastAPI
  from litellm.proxy.proxy_server import router, save_worker_config, initialize, startup_event
label_desc: Use image node_id 2 for calling a global function with example usage: test_embedding(client) without return types