@staticmethod
def quantity_to_string(quantity):
    """
        Helper function to convert a quantity identifier from the schema to a consistent
        string for in RST documentation

        :param quantity: Quantity string used in the format specification
        :return: String describing the quantity
        """
    qdict = {'*': '0 or more', 'zero_or_more': '0 or more', '+':
        '1 or more', 'one_or_more': '1 or more', '?': '0 or 1',
        'zero_or_one': '0 or 1'}
    if isinstance(quantity, int):
        return str(quantity)
    else:
        return qdict[quantity]
