def METHOD_NAME(self, primitive_name):
    if not self.plib.find(primitive_name):
        primitive = self.ckt_lib.find(primitive_name)
        # add model for instances in the primitive first
        if isinstance(primitive, SubCircuit):
            with set_context(self.plib):
                for e in primitive.elements:
                    if not self.plib.find(e.model):
                        self.plib.append(self.ckt_lib.find(e.model))
        with set_context(self.plib):
            self.plib.append(primitive)