def METHOD_NAME(
    self, cognite_client: CogniteClient, integration_test_space: Space, monkeypatch: Any
) -> None:
    # Arrange
    valid_container = ContainerApply(
        space=integration_test_space.space,
        external_id="IntegrationTestContainer",
        properties={
            "name": ContainerProperty(
                type=Text(),
            ),
        },
        used_for="node",
    )
    invalid_container = ContainerApply(
        space="nonExistingSpace",
        external_id="myContainer",
        properties={"name": ContainerProperty(type=Text())},
        used_for="node",
    )
    monkeypatch.setattr(cognite_client.data_modeling.containers, "_CREATE_LIMIT", 1)
    try:
        # Act
        with pytest.raises(CogniteAPIError) as error:
            cognite_client.data_modeling.containers.apply([valid_container, invalid_container])
        # Assert
        assert "One or more spaces do not exist" in error.value.message
        assert error.value.code == 400
        assert len(error.value.successful) == 1
        assert len(error.value.failed) == 1
    finally:
        # Cleanup
        cognite_client.data_modeling.containers.delete(valid_container.as_id())