def _get_percent(text):
    """If text is formatted like '33.2%', remove the percent and convert
    to a float.  Otherwise, just convert to a float.

    """
    if not text:
        return None
    
    if text.endswith('%'):
        text = text[:-1]

    return float(text.strip())