from typing import get_type_hints
from typing import get_args


def _required_keys(type_hint):
    """Return those keys which are required for a particular typing hint"""
    return [
        k
        for (k, v) in get_type_hints(type_hint).items()
        if type(None) not in get_args(v)
    ]