def METHOD_NAME(value) -> pymacaroons.Macaroon:
    try:
        return pymacaroons.Macaroon.deserialize(value)
    except:  # noqa LP: #1733004
        raise errors.LegacyCredentialsParseError(  # pylint: disable=raise-missing-from
            "Failed to deserialize macaroon"
        )