def METHOD_NAME(cls, value: str) -> Self:
    """Converts a Discord string representation of an emoji to a :class:`PartialEmoji`.
    The formats accepted are:
    - ``a:name:id``
    - ``<a:name:id>``
    - ``name:id``
    - ``<:name:id>``
    If the format does not match then it is assumed to be a unicode emoji.
    .. versionadded:: 2.0
    Parameters
    ----------
    value: :class:`str`
        The string representation of an emoji.
    Returns
    -------
    :class:`PartialEmoji`
        The partial emoji from this string.
    """
    match = cls._CUSTOM_EMOJI_RE.match(value)
    if match is not None:
        groups = match.groupdict()
        animated = bool(groups["animated"])
        emoji_id = int(groups["id"])
        name = groups["name"]
        return cls(name=name, animated=animated, id=emoji_id)
    return cls(name=value, id=None, animated=False)