def dict_contain(dict_a, dict_b):
    """Test if all the key:value pairs of dict_b are in dict_a.

    Arguments:
    dict_a -- The dictionary

    dict_b -- The sub-dictionary

    Return:
    True if all the key:value pairs of dict_b are in dict_a,
    False otherwise
    """

    if len(dict_b) > len(dict_a): return False

    for k,v in dict_b.iteritems():
        if not (k in dict_a and dict_a[k] == v):
            return False

    return True