```python:inference/core/workflows/core_steps/models/foundation/clip_comparison/v2.py
from importlib import import_module

from inference.core.workflows.prototypes.block import WorkflowBlockManifest

LONG_DESCRIPTION = """
Use the OpenAI CLIP zero-shot classification model to classify images.

This block accepts an image and a list of text prompts. The block then returns the 
similarity of each text label to the provided image.

This block is useful for classifying images without having to train a fine-tuned 
classification model. For example, you could use CLIP to classify the type of vehicle 
in an image, or if an image contains NSFW material.
"""



# Cache the module object to avoid repeated name-binding imports while still
# observing any runtime changes to the module's attributes.
_clip_v1_module = None


class BlockManifest(WorkflowBlockManifest):

    @classmethod
    def get_required_cache_artifacts(cls) -> list:
        """Return list of model_id variants that can satisfy this block."""
        global _clip_v1_module
        if _clip_v1_module is None:
            # Import the module object once (lazy) and reuse it on subsequent calls.
            # This preserves behavior (ImportError when the module is unavailable)
            # while avoiding the repeated overhead of "from ... import name" each call.
            _clip_v1_module = import_module(
                "inference.core.workflows.core_steps.models.foundation.clip.v1"
            )

        return list(_clip_v1_module.CLIP_CACHE_MODEL_IDS)
```