code: def stmt2dzn(name, val, declare=True, assign=True, wrap=True):
      
      if not (declare or assign):
          raise ValueError(
              'The statement must be a declaration or an assignment.'
          )
  
      stmt = []
      if declare:
          val_type = _dzn_type(val)
          stmt.append('{}: '.format(val_type))
      stmt.append(name)
      if assign:
          val_str = val2dzn(val, wrap=wrap)
          stmt.append(' = {}'.format(val_str))
      stmt.append(';')
      return ''.join(stmt)
docs: Returns a dzn statement declaring and assigning the given value.
  
      Parameters
      ----------
      val
          The value to serialize.
      declare : bool
          Whether to include the declaration of the variable in the statement or
          just the assignment.
      assign : bool
          Wheter to include the assignment of the value in the statement or just
          the declaration.
      wrap : bool
          Whether to wrap the serialized value.
  
      Returns
      -------
      str
          The serialized dzn representation of the value.