code: def search_logs(log_file_path, num_good_logs=1):
      """
      Searches the given log file for logs containing the "/api/public" string.
  
      Parameters:
      - log_file_path (str): The path to the log file to be searched.
  
      Returns:
      - None
  
      Raises:
      - Exception: If there are any bad logs found in the log file.
      """
      import re
  
      print("\n searching logs")
      bad_logs = []
      good_logs = []
      all_logs = []
      try:
          with open(log_file_path, "r") as log_file:
              lines = log_file.readlines()
              print(f"searching logslines: {lines}")
              for line in lines:
                  all_logs.append(line.strip())
                  if "/api/public" in line:
                      print("Found log with /api/public:")
                      print(line.strip())
                      print("\n\n")
                      match = re.search(
                          r'"POST /api/public/ingestion HTTP/1.1" (\d+) (\d+)',
                          line,
                      )
                      if match:
                          status_code = int(match.group(1))
                          print("STATUS CODE", status_code)
                          if (
                              status_code != 200
                              and status_code != 201
                              and status_code != 207
                          ):
                              print("got a BAD log")
                              bad_logs.append(line.strip())
                          else:
                              good_logs.append(line.strip())
          print("\nBad Logs")
          print(bad_logs)
          if len(bad_logs) > 0:
              raise Exception(f"bad logs, Bad logs = {bad_logs}")
          assert (
              len(good_logs) == num_good_logs
          ), f"Did not get expected number of good logs, expected {num_good_logs}, got {len(good_logs)}. All logs \n {all_logs}"
          print("\nGood Logs")
          print(good_logs)
          if len(good_logs) <= 0:
              raise Exception(
                  f"There were no Good Logs from Langfuse. No logs with /api/public status 200. \nAll logs:{all_logs}"
              )
  
      except Exception as e:
          raise e
  
file_path: litellm/litellm/tests/test_alangfuse.py
imports: import json
  import sys
  import os
  import io, asyncio
  import logging
  from litellm import completion
  import litellm
  import time
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: search_logs(log_file_path, num_good_logs) without return types