# Path: pyconll/conllable.py
# class Conllable(metaclass=abc.ABCMeta):
#     """
#     A Conllable mixin to indicate that the component can be converted into a
#     CoNLL representation.
#     """
#     @abc.abstractmethod
#     def conll(self) -> str:
#         """
#         Provides a conll representation of the component.
# 
#         Returns:
#             A string conll representation of the base component.
# 
#         Raises:
#             NotImplementedError: If the child class does not implement the
#                 method.
#         """
#         raise NotImplementedError("No implementation for conll")
# 
# Path: pyconll/exception.py
# class ParseError(ValueError):
#     """
#     Error that results from an improper value into a parsing routine.
#     """
# 
# class FormatError(ValueError):
#     """
#     Error that results from trying to format a CoNLL object to a string.
#     """


import functools
import math
from typing import Callable, ClassVar, Dict, Optional, Set, Tuple
from pyconll.conllable import Conllable
from pyconll.exception import ParseError, FormatError

    Args:
        value: The value to convert to its CoNLL-U format.
        empty: The empty representation for a unit in CoNLL-U.

    Returns:
        empty if value is None and value otherwise.
    """
    return empty if value is None else value


def _dict_conll_map_formatter(v, v_delimiter):
    """
    Formatter to convert a set of CoNLL values to a string representation.

    Args:
        v: The set of values.
        v_delimiter: The delimiter between the values in a string representation.

    Returns:
        The appropriate string representation of the value in CoNLL format.

    Raises:
        FormatError: When there are no values to output.
    """
    if v:
        sorted_vs = sorted(v, key=str.lower)
        str_vs = v_delimiter.join(sorted_vs)
    else:
        error_msg = 'There are no values to format.'

# Path: pyconll/conllable.py
# class Conllable(metaclass=abc.ABCMeta):
#     """
#     A Conllable mixin to indicate that the component can be converted into a
#     CoNLL representation.
#     """
#     @abc.abstractmethod
#     def conll(self) -> str:
#         """
#         Provides a conll representation of the component.
# 
#         Returns:
#             A string conll representation of the base component.
# 
#         Raises:
#             NotImplementedError: If the child class does not implement the
#                 method.
#         """
#         raise NotImplementedError("No implementation for conll")
# 
# Path: pyconll/exception.py
# class ParseError(ValueError):
#     """
#     Error that results from an improper value into a parsing routine.
#     """
# 
# class FormatError(ValueError):
#     """
#     Error that results from trying to format a CoNLL object to a string.
#     """


# Path: pyconll/unit/token.py
import functools
import math
from typing import Callable, ClassVar, Dict, Optional, Set, Tuple
from pyconll.conllable import Conllable
from pyconll.exception import ParseError, FormatError


    Args:
        value: The value to convert to its CoNLL-U format.
        empty: The empty representation for a unit in CoNLL-U.

    Returns:
        empty if value is None and value otherwise.
    """
    return empty if value is None else value


def _dict_conll_map_formatter(v, v_delimiter):
    """
    Formatter to convert a set of CoNLL values to a string representation.

    Args:
        v: The set of values.
        v_delimiter: The delimiter between the values in a string representation.

    Returns:
        The appropriate string representation of the value in CoNLL format.

    Raises:
        FormatError: When there are no values to output.
    """
    if v:
        sorted_vs = sorted(v, key=str.lower)
        str_vs = v_delimiter.join(sorted_vs)
    else:
        error_msg = 'There are no values to format.'

        raise FormatError(error_msg)