:param dict attrs: If one of the attrs is named "base\_", assume that attribute is an instance of SimpleModel mapped on a Postgresql composite type, and that the base\_ instance is of a superclass of this class. Expand the attributes of the base\_ type and assign to class attributes.

        psycopg2's type casting uses namedtuple() and that forbids a
        name to start with underscore, so we end it with _ instead

def merge_base_attrs(attrs):
        """
        :param dict attrs: If one of the attrs is named "base\_", assume that attribute is an instance of SimpleModel mapped on a Postgresql composite type, and that the base\_ instance is of a superclass of this class. Expand the attributes of the base\_ type and assign to class attributes.

        psycopg2's type casting uses namedtuple() and that forbids a
        name to start with underscore, so we end it with _ instead
        """
        base = attrs.pop('base_', None)
        if base:
            d_out("SimpleModel.merge_base_attrs: base.table={0}".format(base.table))
            for name in base.table:
                attrs[name] = base.__dict__[name]