class_docstr: Represents a store of assets backed by metadata providers.
class_docstr_tok: ["Represents","a","store","of","assets","backed","by","metadata","providers","."]
code: def _do_retrieve_card(self, name: str, envs: List[str]) -> AssetCard:
      metadata = self._get_metadata(name)
  
      # If we have environment-specific metadata, merge it with `metadata`.
      for env in envs:
          try:
              env_metadata = self._get_metadata(f"{name}@{env}")
  
              # Do not allow overriding 'name'.
              del env_metadata["name"]
  
              metadata.update(env_metadata)
          except AssetNotFoundError:
              pass
  
      try:
          base_name = metadata["base"]
      except KeyError:
          base_name = None
  
      base_card: Optional[AssetCard] = None
  
      # If the metadata has a base specified, we have to recursively load the
      # entire chain up to the root.
      if base_name:
          if not isinstance(base_name, str):
              raise AssetCardError(
                  f"The value of the field 'base' of the asset card '{name}' must be of type `{str}`, but is of type `{type(base_name)}` instead."
              )
  
          base_card = self._do_retrieve_card(base_name, envs)
  
      return AssetCard(metadata, base_card)
  
imports: from __future__ import annotations
  import os
  from abc import ABC, abstractmethod
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Protocol, final
  from fairseq2.assets.card import AssetCard, AssetCardError
  from fairseq2.assets.metadata_provider import AssetMetadataProvider, AssetNotFoundError, FileAssetMetadataProvider
  from fairseq2.assets.utils import _get_path_from_env
  from fairseq2.typing import finaloverride
label_desc: Use image node_id 4 for calling the ProviderBackedAssetStore obj's underlying member method code with example usage: obj._do_retrieve_card(name, envs) and returns: AssetCard