def safeget(dct, keys, default=None):
    """
    This allows me to get keys in a nested dictionary safely when I'm not
    sure if the final key or any parent keys exist. Note that when the key
    list is an empty list, it just returns the dictionary. This is intended
    behavior.
    """
    # if not keys or len(keys) == 0:
    #     return default
    for key in keys:
        try:
            dct = dct[key]
        except KeyError:
            return default
        except TypeError:
            return default
    return dct