In Python 3.8+, you can create a dictionary with type annotations with the TypedDict class in the typing module. This is a regular dictionary that allows you to define it with type hints, allowing for better documentation of simple objects like dictionaries. To use them, create a class that inherits from typing.TypedDict and define your expected keys and their types like so:

from typing import TypedDict

class ModelMetadata(TypedDict):
    audience_id: str
    training_correlation: List[float]
    validation_correlation: List[float]
    final_sample_count: int
    final_accounts: List[AccountMetadata]