code: def _delete_resources(sagemaker_client, experiment_name, trials):
      for trial, tc in trials.items():
          with _ignore_resource_not_found(sagemaker_client):
              sagemaker_client.disassociate_trial_component(
                  TrialName=trial, TrialComponentName=tc
              )
              _wait_for_trial_component_disassociation(
                  sagemaker_client, tc
              )
  
          with _ignore_resource_not_found(sagemaker_client):
              sagemaker_client.delete_trial_component(
                  TrialComponentName=tc
              )
  
          with _ignore_resource_not_found(sagemaker_client):
              sagemaker_client.delete_trial(TrialName=trial)
  
      with _ignore_resource_not_found(sagemaker_client):
          sagemaker_client.delete_experiment(
              ExperimentName=experiment_name
          )
  
file_path: sagemaker-python-sdk/tests/integ/test_experiments_analytics.py
imports: from __future__ import absolute_import
  import time
  import uuid
  from contextlib import contextmanager
  import pytest
  from sagemaker.analytics import ExperimentAnalytics
label_desc: Use image node_id 8 for calling a global function with example usage: _delete_resources(sagemaker_client, experiment_name, trials) without return types