class_docstr: The set of expected inputs to a custom handler for a
code: def log_pre_api_call(self, model, messages, kwargs):
      try:
          print(f"received kwargs in pre-input: {kwargs}")
          self.states.append("sync_pre_api_call")
          ## MODEL
          assert isinstance(model, str)
          ## MESSAGES
          assert isinstance(messages, list)
          ## KWARGS
          assert isinstance(kwargs["model"], str)
          assert isinstance(kwargs["messages"], list)
          assert isinstance(kwargs["optional_params"], dict)
          assert isinstance(kwargs["litellm_params"], dict)
          assert isinstance(
              kwargs["start_time"], (datetime, type(None))
          )
          assert isinstance(kwargs["stream"], bool)
          assert isinstance(kwargs["user"], (str, type(None)))
          ### ROUTER-SPECIFIC KWARGS
          assert isinstance(kwargs["litellm_params"]["metadata"], dict)
          assert isinstance(
              kwargs["litellm_params"]["metadata"]["model_group"], str
          )
          assert isinstance(
              kwargs["litellm_params"]["metadata"]["deployment"], str
          )
          assert isinstance(
              kwargs["litellm_params"]["model_info"], dict
          )
          assert isinstance(
              kwargs["litellm_params"]["model_info"]["id"], str
          )
          assert isinstance(
              kwargs["litellm_params"]["proxy_server_request"],
              (str, type(None)),
          )
          assert isinstance(
              kwargs["litellm_params"]["preset_cache_key"],
              (str, type(None)),
          )
          assert isinstance(
              kwargs["litellm_params"]["stream_response"], dict
          )
      except Exception as e:
          print(f"Assertion Error: {traceback.format_exc()}")
          self.errors.append(traceback.format_exc())
  
file_path: litellm/litellm/tests/test_custom_callback_router.py
imports: import sys, os, time, inspect, asyncio, traceback
  from datetime import datetime
  import pytest
  from typing import Optional, Literal, List
  from litellm import Router, Cache
  import litellm
  from litellm.integrations.custom_logger import CustomLogger
label_desc: Use image node_id 2 for calling the CompletionCustomHandler obj's underlying member method code with example usage: obj.log_pre_api_call(model, messages, kwargs) without return types