@staticmethod
def _sparse_token(sparse):
    """
        Returns the numerical CDF value for sparseness.
        """
    sparses = {'no_sparse': 0, 'pad_sparse': 1, 'prev_sparse': 2}
    try:
        return sparses[sparse.lower()]
    except Exception:
        return 0
