import networkx as nx


def get_most_central_node(G):
    """
    Calculate the closeness centrality for all nodes of graph. Return maximum node
    :param G: graph
    :return: node with maximal closeness centrality
    """
    closeness = nx.closeness_centrality(G)
    return max(closeness, key=closeness.get)