def get_item(data_dict, key_tuple):
    """Helper function to get the value in a hierarchical dictionary given the key path.

    Args:
        data_dict (dict): The data structure. For example:
            {
                "a": {
                    "b": 1,
                    "c": {
                        "d": 2,
                    }
                }
            }

        key_tuple (tuple): The key path to the target field. For example, given the data_dict above, the key_tuple
            ("a", "c", "d") should return 2.
    """
    for key in key_tuple:
        data_dict = data_dict[key]
    return data_dict