def get_var(input_dict, accessor_string):
    """Gets data from a dictionary using a dotted accessor-string"""
    current_data = {}
    if 'desired' in input_dict:
        current_data['desired'] = input_dict['desired']
    if 'reported' in input_dict:
        current_data['reported'] = input_dict['reported']
    if accessor_string == '':
        return current_data
    for chunk in accessor_string.split('.'):
        if chunk == '':
            return current_data
        if chunk not in current_data:
            return current_data
        current_data = current_data[chunk]
    return current_data