def METHOD_NAME(expr):
    """
    Returns a dictionary of {var_name_or_None: coef} values. None
    indicates a numeric constant.
    """
    terms = {}
    # Get the variables from the canonical representation
    vars = expr.pop(-1, {})
    # Find the linear terms
    linear = expr.pop(1, {})
    for k in linear:
        # FrozenDicts don't support (k, v)-style iteration
        v = linear[k]
        # There's exactly 1 variable in each term
        terms[vars[k.keys()[0]].label] = v
    # Get the constant term, if present
    const = expr.pop(0, {})
    if None in const:
        terms[None] = const[None]
    if len(expr) != 0:
        raise TypeError("Nonlinear terms in expression")
    return terms