def METHOD_NAME(cls, value):
    """Build a _ContentDisposition from header values."""
    # We allow non-ascii here (it will only be parsed inside of qdtext, and
    # rejected by the grammar if it appears in other places), although parsing
    # it can be ambiguous.  Parsing it ensures that a non-ambiguous filename*
    # value won't get dismissed because of an unrelated ambiguity in the
    # filename parameter. But it does mean we occasionally give
    # less-than-certain values for some legacy senders.
    decoded = value.decode('iso-8859-1')
    reg = email.headerregistry.HeaderRegistry()
    try:
        parsed = reg('Content-Disposition', decoded)
    except IndexError:  # pragma: no cover
        # WORKAROUND for https://github.com/python/cpython/issues/81672
        # Fixed in Python 3.7.5 and 3.8.0.
        # Still getting failures on 3.10 on CI though
        raise ContentDispositionError("Missing closing quote character")
    except ValueError:
        # WORKAROUND for https://github.com/python/cpython/issues/87112
        raise ContentDispositionError("Non-ASCII digit")
    except AttributeError:  # pragma: no cover
        # WORKAROUND for https://github.com/python/cpython/issues/93010
        raise ContentDispositionError("Section number has an invalid leading 0")
    if parsed.defects:
        defects = list(parsed.defects)
        if defects != [cls._IGNORED_DEFECT]:
            raise ContentDispositionError(defects)
    # https://github.com/python/mypy/issues/12314
    assert isinstance(
        parsed,  # type: ignore[unreachable]
        email.headerregistry.ContentDispositionHeader,
    ), parsed
    return cls(  # type: ignore[unreachable]
        disposition=parsed.content_disposition,
        params=parsed.params,
    )