def get_key_val_of_max(dict_obj):
    """Returns the key-value pair with maximal value in the given dict.

    Example:
    --------
    >>> dict_obj = {'a':2, 'b':1}
    >>> print(get_key_val_of_max(dict_obj))
    ('a', 2)
    """
    return max(dict_obj.items(), key=lambda item: item[1])
