code: def assert_message_in_logs(msg, records):
      """
      Helper function to check if a msg is present in any of
      the records (an iterable of strings).
      """
  
      count = 0
      for record in records:
          if msg in record.msg:
              count += 1
  
      assert count > 0
  
file_path: alibi/alibi/tests/utils.py
imports: from contextlib import contextmanager
  from typing import Optional
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: assert_message_in_logs(msg, records) without return types