def get_function_kwargs(f):
    """
    Get dictionary of a function's keyword arguments and their default values. 
    
    Args:
        :f:
            | function name
    
    Returns:
        :dict:
            | Dict with the function's keyword arguments and their default values
            | Is empty if there are no defaults (i.e. f.__defaults__ or f.__kwdefaults__ are None).
    """
    kwdefs = f.__kwdefaults__
    if kwdefs is None:
        kwdefs = {}
    names = f.__code__.co_varnames[:f.__code__.co_argcount]
    if f.__defaults__ is not None:
        d = dict(zip(names[::-1][:len(f.__defaults__)][::-1], f.__defaults__))
    else:
        d = {}
    d.update(kwdefs)
    return d
