class_docstr: A wrapper class for openai client.
docstr: Update the tool call from the chunk.
  
  Args:
      tool_call_chunk: The tool call chunk.
      full_tool_call: The full tool call.
      completion_tokens: The number of completion tokens.
  
  Returns:
      The updated full tool call and the updated number of completion tokens.
docstr_tok: ["Update","the","tool","call","from","the","chunk",".","Args",":","tool_call_chunk",":","The","tool","call","chunk",".","full_tool_call",":","The","full","tool","call",".","completion_tokens",":","The","number","of","completion","tokens",".","Returns",":","The","updated","full","tool","call","and","the","updated","number","of","completion","tokens","."]
code: def _update_tool_calls_from_chunk(
      tool_calls_chunk: ChoiceDeltaToolCall,
      full_tool_call: Optional[Dict[str, Any]],
      completion_tokens: int,
  ) -> Tuple[Dict[str, Any], int]:
      """Update the tool call from the chunk.
  
      Args:
          tool_call_chunk: The tool call chunk.
          full_tool_call: The full tool call.
          completion_tokens: The number of completion tokens.
  
      Returns:
          The updated full tool call and the updated number of completion tokens.
  
      """
      # future proofing for when tool calls other than function calls are supported
      if tool_calls_chunk.type and tool_calls_chunk.type != "function":
          raise NotImplementedError(
              f"Tool call type {tool_calls_chunk.type} is currently not supported. "
              "Only function calls are supported."
          )
  
      # Handle tool call
      assert full_tool_call is None or isinstance(
          full_tool_call, dict
      ), full_tool_call
      if tool_calls_chunk:
          if full_tool_call is None:
              full_tool_call = {}
          for field in ["index", "id", "type"]:
              completion_tokens += (
                  OpenAIWrapper._update_dict_from_chunk(
                      tool_calls_chunk, full_tool_call, field
                  )
              )
  
          if (
              hasattr(tool_calls_chunk, "function")
              and tool_calls_chunk.function
          ):
              if "function" not in full_tool_call:
                  full_tool_call["function"] = None
  
              (
                  full_tool_call["function"],
                  completion_tokens,
              ) = OpenAIWrapper._update_function_call_from_chunk(
                  tool_calls_chunk.function,
                  full_tool_call["function"],
                  completion_tokens,
              )
  
      if full_tool_call:
          return full_tool_call, completion_tokens
      else:
          raise RuntimeError(
              "Tool call is not found, this should not happen."
          )
  
imports: from __future__ import annotations
  import os
  import sys
  from typing import Any, List, Optional, Dict, Callable, Tuple, Union
  import logging
  import inspect
  from flaml.automl.logger import logger_formatter
  from pydantic import BaseModel
  from autogen.oai import completion
  from autogen.oai.openai_utils import DEFAULT_AZURE_API_VERSION, get_key, OAI_PRICE1K
  from autogen.token_count_utils import count_token
  from autogen._pydantic import model_dump
label_desc: Use image node_id 10 for calling the OpenAIWrapper obj's underlying member method code with example usage: obj._update_tool_calls_from_chunk(tool_calls_chunk, full_tool_call, completion_tokens) and returns: full_tool_call,  completion_tokens