code: def get_latest_log(caplog):
      def inner():
          return caplog.records[-1].getMessage()
  
      with caplog.at_level(logging.INFO, "transport_logger_test"):
          yield inner
  
imports: import logging
  import sys
  import unittest
  import pytest
  import tvm.testing
label_desc: Use image node_id 3 for calling a global function with example usage: get_latest_log(caplog) and returns: caplog