<gh_stars>100-1000
from typing import cast, Any, Dict, TypeVar

T = TypeVar("T")


def merge_kwargs(base_dict: T, **kwargs: Any) -> T:
    """Return arbitrary typed dictionary with some keyword args merged in."""
    return cast(T, {**cast(Dict, base_dict), **kwargs})

from typing import cast, Any, Dict, TypeVar

T = TypeVar("T")


def merge_kwargs(base_dict: T, **kwargs: Any) -> T:
    """Return arbitrary typed dictionary with some keyword args merged in."""
    return cast(T, {**cast(Dict, base_dict), **kwargs})
Return arbitrary typed dictionary with some keyword args merged in.