import math


def absolute_value(vector):
    """Returns the absolute value of a vector.

    It is calculated by the
    euclidean norm ``abs(a) = Sqrt( pow(a1) + pow(a2) + pow(a3) )``

    :param vector: vector.abstractvector.DocumentVector
    :type vector: the vector whose absolute value will be calculated
    :returns: int
    """
    values = [ v for v in vector.values ]
    square_values = [ v**2 for v in values]
    absolute_value = math.sqrt(sum(square_values))
    return absolute_value
    pass