def METHOD_NAME(session, generator, eval_names, eval_func, iterations):
    """
    Evaluates the graph's performance by running data through the network
    and calling an evaluation function to generate the performance metric.
    :param session: The tensorflow session that contains the graph
    :param generator: The data generator providing the network with batch data
    :param eval_names: The names providing the nodes on which the network's performance should be judged
    :param eval_func: The customized function to evaluate the performance of the network
    :param iterations: The number of iterations (batches) to run through the network
    :return:
    """
    # Ensure any uninitialized variables are initialized
    initialize_uninitialized_vars(session)
    # Get the first batch and ue it to create the tensor map
    t_map = _create_map_of_input_tensors(generator, session)
    eval_outputs = []
    for name in eval_names:
        op = session.graph.get_operation_by_name(name)
        eval_outputs.append(op.outputs[0])
    # Run the graph and verify the data is being updated properly for each iteration
    avg_metric = 0
    log.info("Evaluating graph for %i iterations", iterations)
    for _, batch in zip(range(iterations), generator):
        # Setup the feed dictionary
        feed_dict = {}
        for name, data in batch.items():
            feed_dict[t_map[name]] = data
        output_data = session.run(eval_outputs, feed_dict=feed_dict)
        avg_metric += eval_func(list(zip(eval_names, output_data)))
    log.info("Completed graph evaluation for %i iterations", iterations)
    return avg_metric / iterations