code: def log_event(
      self,
      model,
      messages,
      response_obj,
      start_time,
      end_time,
      print_verbose,
  ):
      # Method definition
      try:
          print_verbose(
              f"BerriSpend Logging - Enters logging function for model {model}"
          )
  
          url = f"https://berrispend.berri.ai/spend"
          headers = {"Content-Type": "application/json"}
  
          (
              prompt_tokens_cost_usd_dollar,
              completion_tokens_cost_usd_dollar,
          ) = self.price_calculator(
              model, response_obj, start_time, end_time
          )
          total_cost = (
              prompt_tokens_cost_usd_dollar
              + completion_tokens_cost_usd_dollar
          )
  
          response_time = (end_time - start_time).total_seconds()
          if "response" in response_obj:
              data = [
                  {
                      "response_time": response_time,
                      "model_id": response_obj["model"],
                      "total_cost": total_cost,
                      "messages": messages,
                      "response": response_obj["choices"][0]["message"][
                          "content"
                      ],
                      "account_id": self.account_id,
                  }
              ]
          elif "error" in response_obj:
              data = [
                  {
                      "response_time": response_time,
                      "model_id": response_obj["model"],
                      "total_cost": total_cost,
                      "messages": messages,
                      "error": response_obj["error"],
                      "account_id": self.account_id,
                  }
              ]
  
          print_verbose(
              f"BerriSpend Logging - final data object: {data}"
          )
          response = requests.post(url, headers=headers, json=data)
      except:
          # traceback.print_exc()
          print_verbose(
              f"BerriSpend Logging Error - {traceback.format_exc()}"
          )
          pass
  
file_path: litellm/litellm/integrations/berrispend.py
imports: import dotenv, os
  import requests
  import traceback
  import datetime
label_desc: Use image node_id 3 for calling the BerriSpendLogger obj's underlying member method code with example usage: obj.log_event(model, messages, response_obj, start_time, end_time, print_verbose) without return types