docstr: Patches the API to log wandb Media or metrics.
docstr_tok: ["Patches","the","API","to","log","wandb","Media","or","metrics","."]
code: def __init__(
      self,
      name: str,
      symbols: Sequence[str],
      resolver: ArgumentResponseResolver,
  ) -> None:
      """Patches the API to log wandb Media or metrics."""
      # name of the LLM provider, e.g. "Cohere" or "OpenAI" or package name like "Transformers"
      self.name = name
      # api library name, e.g. "cohere" or "openai" or "transformers"
      self._api = None
      # dictionary of original methods
      self.original_methods: Dict[str, Any] = {}
      # list of symbols to patch, e.g. ["Client.generate", "Edit.create"] or ["Pipeline.__call__"]
      self.symbols = symbols
      # resolver callable to convert args/response into a dictionary of wandb media objects or metrics
      self.resolver = resolver
  
imports: import asyncio
  import functools
  import inspect
  import logging
  import sys
  from typing import Any, Dict, Optional, Sequence, TypeVar
  import wandb.sdk
  import wandb.util
  from wandb.sdk.lib import telemetry
  from wandb.sdk.lib.timer import Timer
label_desc: Use image node_id 1 to create a new PatchAPI object  with example: obj = PatchAPI(name, symbols, resolver)