code: def _cleanup_logs(resource_name, resource_type, sagemaker_session):
      log_group = "/aws/sagemaker/{}/{}".format(
          resource_type, resource_name
      )
      try:
          # print out logs before deletion for debuggability
          logger.info("deleting cloudwatch log group %s:", log_group)
          cwl_client = sagemaker_session.boto_session.client("logs")
          cwl_client.delete_log_group(logGroupName=log_group)
          logger.info("deleted cloudwatch log group: %s", log_group)
      except Exception:
          logger.exception(
              "Failure occurred while cleaning up cloudwatch log group %s. "
              "Swallowing exception but printing stacktrace for debugging.",
              log_group,
          )
  
file_path: sagemaker-python-sdk/tests/integ/timeout.py
imports: from __future__ import absolute_import
  from contextlib import contextmanager
  import logging
  from time import sleep
  from awslogs.core import AWSLogs
  from botocore.exceptions import ClientError
  import stopit
  from sagemaker import Predictor
  from tests.integ.retry import retries
label_desc: Use image node_id 7 for calling a global function with example usage: _cleanup_logs(resource_name, resource_type, sagemaker_session) without return types