class_docstr: Example usage:
  ```python
  from litellm import Router
  model_list = [
  {
      "model_name": "azure-gpt-3.5-turbo", # model alias
      "litellm_params": { # params for litellm completion/embedding call
          "model": "azure/<your-deployment-name-1>",
          "api_key": <your-api-key>,
          "api_version": <your-api-version>,
          "api_base": <your-api-base>
      },
  },
  {
      "model_name": "azure-gpt-3.5-turbo", # model alias
      "litellm_params": { # params for litellm completion/embedding call
          "model": "azure/<your-deployment-name-2>",
          "api_key": <your-api-key>,
          "api_version": <your-api-version>,
          "api_base": <your-api-base>
      },
  },
  {
      "model_name": "openai-gpt-3.5-turbo", # model alias
      "litellm_params": { # params for litellm completion/embedding call
          "model": "gpt-3.5-turbo",
          "api_key": <your-api-key>,
      },
  ]
  
  router = Router(model_list=model_list, fallbacks=[{"azure-gpt-3.5-turbo": "openai-gpt-3.5-turbo"}])
  ```
docstr: Try calling the function_with_retries
  If it fails after num_retries, fall back to another model group
code: def function_with_fallbacks(self, *args, **kwargs):
      """
      Try calling the function_with_retries
      If it fails after num_retries, fall back to another model group
      """
      model_group = kwargs.get("model")
      fallbacks = kwargs.get("fallbacks", self.fallbacks)
      context_window_fallbacks = kwargs.get(
          "context_window_fallbacks", self.context_window_fallbacks
      )
      try:
          response = self.function_with_retries(*args, **kwargs)
          return response
      except Exception as e:
          original_exception = e
          verbose_router_logger.debug(
              f"An exception occurs {original_exception}"
          )
          try:
              verbose_router_logger.debug(
                  f"Trying to fallback b/w models. Initial model group: {model_group}"
              )
              if (
                  isinstance(e, litellm.ContextWindowExceededError)
                  and context_window_fallbacks is not None
              ):
                  fallback_model_group = None
  
                  for (
                      item
                  ) in (
                      context_window_fallbacks
                  ):  # [{"gpt-3.5-turbo": ["gpt-4"]}]
                      if list(item.keys())[0] == model_group:
                          fallback_model_group = item[model_group]
                          break
  
                  if fallback_model_group is None:
                      raise original_exception
  
                  for mg in fallback_model_group:
                      """
                      Iterate through the model groups and try calling that deployment
                      """
                      try:
                          ## LOGGING
                          kwargs = self.log_retry(
                              kwargs=kwargs, e=original_exception
                          )
                          kwargs["model"] = mg
                          response = self.function_with_fallbacks(
                              *args, **kwargs
                          )
                          return response
                      except Exception as e:
                          pass
              elif fallbacks is not None:
                  verbose_router_logger.debug(
                      f"inside model fallbacks: {fallbacks}"
                  )
                  fallback_model_group = None
                  for item in fallbacks:
                      if list(item.keys())[0] == model_group:
                          fallback_model_group = item[model_group]
                          break
  
                  if fallback_model_group is None:
                      raise original_exception
  
                  for mg in fallback_model_group:
                      """
                      Iterate through the model groups and try calling that deployment
                      """
                      try:
                          ## LOGGING
                          kwargs = self.log_retry(
                              kwargs=kwargs, e=original_exception
                          )
                          kwargs["model"] = mg
                          response = self.function_with_fallbacks(
                              *args, **kwargs
                          )
                          return response
                      except Exception as e:
                          raise e
          except Exception as e:
              raise e
          raise original_exception
  
imports: import copy, httpx
  from datetime import datetime
  from typing import Dict, List, Optional, Union, Literal, Any
  import random, threading, time, traceback, uuid
  import litellm, openai
  from litellm.caching import RedisCache, InMemoryCache, DualCache
  import logging, asyncio
  import inspect, concurrent
  from openai import AsyncOpenAI
  from collections import defaultdict
  from litellm.router_strategy.least_busy import LeastBusyLoggingHandler
  from litellm.router_strategy.lowest_tpm_rpm import LowestTPMLoggingHandler
  from litellm.router_strategy.lowest_latency import LowestLatencyLoggingHandler
  from litellm.llms.custom_httpx.azure_dall_e_2 import CustomHTTPTransport, AsyncCustomHTTPTransport
  from litellm.utils import ModelResponse, CustomStreamWrapper
  import copy
  from litellm._logging import verbose_router_logger
  import logging
label_desc: Use image node_id 8 for calling the Router obj's underlying member method code with example usage: obj.function_with_fallbacks() and returns: response, response, response