def _get_typeddict_value(value: Value, ctx: Context, key: str, required_keys: Optional[Container[str]], total: bool) -> Tuple[(bool, Value)]:
    val = _type_from_runtime(value, ctx, is_typeddict=True)
    if isinstance(val, Pep655Value):
        return (val.required, val.value)
    if (required_keys is None):
        required = total
    else:
        required = (key in required_keys)
    return (required, val)
def _get_typeddict_value(value: Value, ctx: Context, key: str, required_keys: Optional[Container[str]], total: bool) -> Tuple[(bool, Value)]:
    val = _type_from_runtime(value, ctx, is_typeddict=True)
    if isinstance(val, Pep655Value):
        return (val.required, val.value)
    if (required_keys is None):
        required = total
    else:
        required = (key in required_keys)
    return (required, val)