def subtract_by_key(dict_a, dict_b):
    """given two dicts, a and b, this function returns c = a - b, where
    a - b is defined as the key difference between a and b.

    e.g.,
    {1:None, 2:3, 3:"yellow", 4:True} - {2:4, 1:"green"} =
        {3:"yellow", 4:True}

    """
    difference_dict = {}
    for key in dict_a:
        if key not in dict_b:
            difference_dict[key] = dict_a[key]

    return difference_dict
given two dicts, a and b, this function returns c = a - b, where
    a - b is defined as the key difference between a and b.

    e.g.,
    {1:None, 2:3, 3:"yellow", 4:True} - {2:4, 1:"green"} =
        {3:"yellow", 4:True}