def ianlc(mapping):
    """
    Returns the statistics for the number of intra-node logical communications (IaNLC).
    :param mapping: process-to-node mapping
    :return: IaNLC statistics
    """
    weights = [d['weight'] for u, v, d in mapping.process_graph.edges(data=True)
               if mapping.mapping[u] == mapping.mapping[v]]
    try:
        return sum(weights), sum(weights)//len(weights) + 1, min(weights), max(weights)
    except ZeroDivisionError:
        return (0, 0, 0, 0)