from typing import Tuple
from typing import Dict


def field_annotations(typed_dict) -> Tuple[Dict[str, type], Dict[str, type]]:
    """Return the required and optional fields in the TypedDict."""
    return (typed_dict.__annotations__["required_fields"].__annotations__,
            typed_dict.__annotations__["optional_fields"].__annotations__)