def get_kwargs(kwargs, key, default):
    """
    Get an element in kwargs or returnt the default.

    :param kwargs: dictionary of keyworded arguments
    :type kwargs: dict
    :param key: key to retrieve
    :type key: str
    :param default: default value to return
    :type default: mixed
    :return: the retrieved value from kwargs or default
    :rtype: mixed
    """

    if kwargs is not None:
        if key in kwargs.keys():
            return kwargs[key]

    return default