code: def logs(propagate_logs, caplog):
      """A log fixture which captures logs during a test."""
      caplog.set_level(logging.INFO)
      return caplog
  
file_path: ray/python/ray/tests/test_widgets.py
imports: import logging
  from unittest import mock
  import pytest
  import ray
  from ray.widgets.util import repr_with_fallback, _can_display_ipywidgets
label_desc: Use image node_id 1 for calling a global function with example usage: logs(propagate_logs, caplog) and returns: caplog