def _basis_key(t):
    """
    Return a key for the basis element of the Askey-Wilson algebra
    indexed by ``t``.

    EXAMPLES::

        sage: from sage.algebras.askey_wilson import _basis_key
        sage: I = algebras.AskeyWilson(QQ).indices()
        sage: _basis_key(I((0,2,3,1,2,5)))
        (13, (0, 2, 3, 1, 2, 5))
    """
    return (sum(t), t.value)