<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_relevant_nodes(network_id, query_nodes):
 """Return a set of network nodes relevant to a given query set. A heat diffusion algorithm is used on a pre-computed heat kernel for the given network which starts from the given query nodes. The nodes in the network are ranked according to heat score which is a measure of relevance with respect to the query nodes. Parameters network_id : str The UUID of the network in NDEx. query_nodes : list[str] A list of node names with respect to which relevance is queried. Returns ------- ranked_entities : list[(str, float)] A list containing pairs of node names and their relevance scores. """

    url = ndex_relevance + '/rank_entities'
    kernel_id = get_heat_kernel(network_id)
    if kernel_id is None:
        return None
    if isinstance(query_nodes, basestring):
        query_nodes = [query_nodes]
    params = {'identifier_set': query_nodes,
              'kernel_id': kernel_id}
    res = ndex_client.send_request(url, params, is_json=True)
    if res is None:
        logger.error("ndex_client.send_request returned None.")
        return None
    ranked_entities = res.get('ranked_entities')
    if ranked_entities is None:
        logger.error('Could not get ranked entities.')
        return None
    return ranked_entities