@classmethod
def get_sensor_thermal_rel(cls, session, server_key, relationship):
    """Get thermal details about thermal relationship
        Args:e
            session: database session
            server_key(int): key of the server sensor(s) belong to
            relationship(dict): source, target and event 
        """
    query = []
    query.append(
        'MATCH (:ServerWithBMC {{ key: {} }})-[:HAS_SENSOR]->(source:Sensor {{ name: "{}" }})'
        .format(server_key, relationship['source']))
    query.append(
        'MATCH (source)<-[rel :COOLED_BY|:HEATED_BY]-(target {{ {}: {} }})'
        .format(relationship['target']['attribute'], relationship['target']
        ['value']))
    query.extend(['WHERE rel.event = "{}"'.format(relationship['event']),
        'RETURN source, target, rel'])
    results = session.run('\n'.join(query))
    record = results.single()
    return {'source': dict(record.get('source')), 'target': dict(record.get
        ('target')), 'rel': dict(record.get('rel'))} if record else None
