class_docstr: Provides asset metadata stored in memory.
class_docstr_tok: ["Provides","asset","metadata","stored","in","memory","."]
code: def __init__(self, metadata: Sequence[Dict[str, Any]]) -> None:
      self._metadata = {}
  
      for idx, m in enumerate(metadata):
          try:
              name = m["name"]
          except KeyError:
              raise AssetMetadataError(
                  f"The asset metadata at index {idx} in `metadata` does not have a name."
              )
  
          if not isinstance(name, str):
              raise AssetMetadataError(
                  f"The asset metadata at index {idx} in `metadata` has an invalid name."
              )
  
          if name in self._metadata:
              raise AssetMetadataError(
                  f"Two assets have the same name '{name}'."
              )
  
          self._metadata[name] = m
  
imports: import os
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from pathlib import Path
  from typing import Any, Dict, Optional, Sequence, final
  import yaml
  from typing_extensions import NoReturn
  from yaml import YAMLError
  from fairseq2.assets.error import AssetError
  from fairseq2.typing import finaloverride
label_desc: Use image node_id 1 to create a new InProcAssetMetadataProvider object from inherited base classes: AssetMetadataProvider with example: obj = InProcAssetMetadataProvider(metadata)