def _get_headings(obj, delimiter="."):
    """
    Utility function for getting all nested keys
    of a dictionary whose values are themselves
    a dict

    Args:
        obj (dict): nested dictionary to be searched
        delimiter (str): string delimiter for nested
            sub_headings, e. g. top_middle_low for
            'top', 'middle', and 'low' nested keys

    """
    headings = []
    for heading, body in obj.items():
        if isinstance(body, dict):
            headings.append(heading)
            sub_headings = _get_headings(body, delimiter=delimiter)
            headings.extend(
                [delimiter.join([heading, sub_heading]) for sub_heading in sub_headings]
            )
    return headings