<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def install_labels(cls, quiet=True, stdout=None):
 """ Setup labels with indexes and constraints for a given class :param cls: StructuredNode class :type: class :param quiet: (default true) enable standard output :param stdout: stdout stream :type: bool :return: None """


    if not hasattr(cls, '__label__'):
        if not quiet:
            stdout.write(' ! Skipping class {0}.{1} is abstract\n'.format(cls.__module__, cls.__name__))
        return

    for name, property in cls.defined_properties(aliases=False, rels=False).items():
        db_property = property.db_property or name
        if property.index:
            if not quiet:
                stdout.write(' + Creating index {0} on label {1} for class {2}.{3}\n'.format(
                    name, cls.__label__, cls.__module__, cls.__name__))

            db.cypher_query("CREATE INDEX on :{0}({1}); ".format(
                cls.__label__, db_property))

        elif property.unique_index:
            if not quiet:
                stdout.write(' + Creating unique constraint for {0} on label {1} for class {2}.{3}\n'.format(
                    name, cls.__label__, cls.__module__, cls.__name__))

            db.cypher_query("CREATE CONSTRAINT "
                            "on (n:{0}) ASSERT n.{1} IS UNIQUE; ".format(
                cls.__label__, db_property))