def fetch_parameter(kwargs, param):
    """Fetch a parameter from a keyword-argument dict

    Specifically for use in enforcing "stricter" typing for functions or methods that
    use **kwargs to allow for different sets of arguments.
    """
    try:
        return kwargs.pop(param)
    except KeyError:
        raise TypeError('Missing keyword argument {param}'.format(param=param))