@classmethod
def format_target_elements(cls, results, t_format=None):
    """Format neo4j results as target sensors"""
    thermal_details = {'source': {}, 'targets': []}
    for record in results:
        thermal_details['source'] = dict(record.get('source'))
        if not t_format:
            t_format = lambda r: {**dict(r.get('targets')), **{'rel': list(
                map(dict, r.get('rel')))}}
        thermal_details['targets'].append(t_format(record))
    return thermal_details
