code: def test_delete_collection_failure_when_collection_is_not_empty(
      sagemaker_session,
  ):
      collection = Collection(sagemaker_session)
      sagemaker_session.list_group_resources = Mock(
          name="list_group_resources", return_value={"Resources": [{}]}
      )
      delete_response = collection.delete(collections=[COLLECTION_NAME])
      assert len(delete_response["deleted_collections"]) == 0
      assert len(delete_response["delete_collection_failures"]) == 1
  
file_path: sagemaker-python-sdk/tests/unit/test_collection.py
imports: from __future__ import absolute_import
  import pytest
  import json
  from mock import Mock
  from sagemaker.collection import Collection
label_desc: Use image node_id 4 for calling a global function with example usage: test_delete_collection_failure_when_collection_is_not_empty(sagemaker_session) without return types