def METHOD_NAME(self, shared_state: Dict[str, Any]):
    """Delete every Vertex AI resource created during test"""
    yield
    # TODO(b/218310362): Add resource deletion system tests
    # Bring all Endpoints to the front of the list
    # Ensures Models are undeployed first before we attempt deletion
    shared_state["resources"].sort(
        key=lambda r: 1
        if isinstance(r, aiplatform.Endpoint)
        or isinstance(r, aiplatform.MatchingEngineIndexEndpoint)
        or isinstance(r, aiplatform.Experiment)
        else 2
    )
    for resource in shared_state["resources"]:
        try:
            if isinstance(
                resource,
                (
                    aiplatform.Endpoint,
                    aiplatform.Featurestore,
                    aiplatform.MatchingEngineIndexEndpoint,
                ),
            ):
                # For endpoint, undeploy model then delete endpoint
                # For featurestore, force delete its entity_types and features with the featurestore
                resource.delete(force=True)
            elif isinstance(resource, aiplatform.Experiment):
                resource.delete(delete_backing_tensorboard_runs=True)
            else:
                resource.delete()
        except exceptions.GoogleAPIError as e:
            logging.error(f"Could not delete resource: {resource} due to: {e}")