import inspect


def build(klass, **kwargs):
    """Build instance of klass using matching kwargs"""
    known_param_names = list(inspect.signature(klass).parameters.keys())
    known_params = {n: kwargs[n] for n in known_param_names if n in kwargs}
    return klass(**known_params)