@classmethod
def get_affected_sensors(cls, session, server_key, source_name):
    """Get sensors affected by the source sensor
        
        Args:
            session: database session
            server_key(int): key of the server sensors belong to
            source_name(str): name of the source sensor
        Returns:
            dict: source and target sensor details
        """
    results = session.run(
        """
            MATCH (:ServerWithBMC { key: $server })-[:HAS_SENSOR]->(source:Sensor { name: $source })
            MATCH (source)<-[rel]-(targets:Sensor) return source, targets, collect(rel) as rel
            """
        , server=server_key, source=source_name)
    return cls.format_target_elements(results)
