def parity(self, allow_rescaling_flag=True):
    """
    Returns the parity ("even" or "odd") of an integer-valued quadratic
    form over `ZZ`, defined up to similitude/rescaling of the form so that
    its Jordan component of smallest scale is unimodular.  After this
    rescaling, we say a form is even if it only represents even numbers,
    and odd if it represents some odd number.

    If the 'allow_rescaling_flag' is set to False, then we require that
    the quadratic form have a Gram matrix with coefficients in `ZZ`, and
    look at the unimodular Jordan block to determine its parity.  This
    returns an error if the form is not integer-matrix, meaning that it
    has Jordan components at `p=2` which do not have an integer scale.

    We determine the parity by looking for a 1x1 block in the 0-th
    Jordan component, after a possible rescaling.

    INPUT:

        self -- a quadratic form with base_ring `ZZ`, which we may
                require to have integer Gram matrix.

    OUTPUT:

        One of the strings: "even" or "odd"

    EXAMPLES::

        sage: Q = QuadraticForm(ZZ, 3, [4, -2, 0, 2, 3, 2]); Q
        Quadratic form in 3 variables over Integer Ring with coefficients:
        [ 4 -2 0 ]
        [ * 2 3 ]
        [ * * 2 ]
        sage: Q.parity()
        'even'

    ::

        sage: Q = QuadraticForm(ZZ, 3, [4, -2, 0, 2, 3, 1]); Q
        Quadratic form in 3 variables over Integer Ring with coefficients:
        [ 4 -2 0 ]
        [ * 2 3 ]
        [ * * 1 ]
        sage: Q.parity()
        'even'

    ::

        sage: Q = QuadraticForm(ZZ, 3, [4, -2, 0, 2, 2, 2]); Q
        Quadratic form in 3 variables over Integer Ring with coefficients:
        [ 4 -2 0 ]
        [ * 2 2 ]
        [ * * 2 ]
        sage: Q.parity()
        'even'

    ::

        sage: Q = QuadraticForm(ZZ, 3, [4, -2, 0, 2, 2, 1]); Q
        Quadratic form in 3 variables over Integer Ring with coefficients:
        [ 4 -2 0 ]
        [ * 2 2 ]
        [ * * 1 ]
        sage: Q.parity()
        'odd'

    """
    ## Deal with 0-dim'l forms
    if self.dim() == 0:
        return "even"

    ## Identify the correct Jordan component to use.
    Jordan_list = self.jordan_blocks_by_scale_and_unimodular(2)
    scale_pow_list = [J[0]  for J in Jordan_list]
    min_scale_pow = min(scale_pow_list)
    if allow_rescaling_flag:
        ind = scale_pow_list.index(min_scale_pow)
    else:
        if min_scale_pow < 0:
            raise TypeError("Oops!  If rescaling is not allowed, then we require our form to have an integral Gram matrix.")
        ind = scale_pow_list.index(0)


    ## Find the component of scale (power) zero, and then look for an odd dim'l component.
    J0 = Jordan_list[ind]
    Q0 = J0[1]

    ## The lattice is even if there is no component of scale (power) 0
    if J0 is None:
        return "even"

    ## Look for a 1x1 block in the 0-th Jordan component (which by
    ## convention of the local_normal_form routine will appear first).
    if Q0.dim() == 1:
        return "odd"
    elif Q0[0,1] == 0:
        return "odd"
    else:
        return "even"