def infinity_norm(x):
    """
    Compute infinity norm of x.
    :param x: rare matrix represented as dictionary of dictionaries of non zero values
    :return max_value: maximum value of x
    """
    max_value = None
    for line in x.keys():
        for column in x[line].keys():
            if not max_value or max_value < x[line][column]:
                max_value = x[line][column]
    return max_value