(self, facets, replace=True)
return self
Adds the contents of the given ``Facets`` or ``dict`` object to this
        object.
Adds the contents of the given ``Facets`` or ``dict`` object to this
        object.
Adds the contents of the given Facets or dict object to this object .
def add_facets(self, facets, replace=True):
        """Adds the contents of the given ``Facets`` or ``dict`` object to this
        object.
        """

        if not isinstance(facets, (dict, Facets)):
            raise Exception("%r is not a Facets object or dict" % facets)
        for name, facet in facets.items():
            if replace or name not in self.facets:
                self.facets[name] = facet
        return self
def add_facets ( self , facets , replace = True ) : if not isinstance ( facets , ( dict , Facets ) ) : raise Exception ( "%r is not a Facets object or dict" % facets ) for name , facet in facets . items ( ) : if replace or name not in self . facets : self . facets [ name ] = facet return self