<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stmt2enum(enum_type, declare=True, assign=True, wrap=True):
 """Returns a dzn enum declaration from an enum type. Parameters enum_type : Enum The enum to serialize. declare : bool Whether to include the ``enum`` declatation keyword in the statement or just the assignment. assign : bool Wheter to include the assignment of the enum in the statement or just the declaration. wrap : bool Whether to wrap the serialized enum. Returns ------- str The serialized dzn representation of the enum. """


    if not (declare or assign):
        raise ValueError(
            'The statement must be a declaration or an assignment.'
        )

    stmt = []
    if declare:
        stmt.append('enum ')
    stmt.append(enum_type.__name__)
    if assign:
        val_str = []
        for v in list(enum_type):
            val_str.append(v.name)
        val_str = ''.join(['{', ','.join(val_str), '}'])

        if wrap:
            wrapper = _get_wrapper()
            val_str = wrapper.fill(val_str)

        stmt.append(' = {}'.format(val_str))
    stmt.append(';')
    return ''.join(stmt)