def attach(self, *slaves):

        slave_list = []
        for slave in slaves:
            slave = slave.wrap()

            # Make sure we have a tree match
            if slave.root.tag != self.root.tag:
                msg = _("Template tree mismatch; adding slave %(slavetag)s to "
                        "master %(mastertag)s") % {'slavetag': slave.root.tag,
                                                   'mastertag': self.root.tag}
                raise ValueError(msg)

            # Make sure slave applies to this template
            if not slave.apply(self):
                continue

            slave_list.append(slave)

        # Add the slaves
        self.slaves.extend(slave_list)
Check validity of a credentials file.
dataset/ETHPy150Open openstack/rack/rack/api/xmlutil.py/MasterTemplate.attach--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/twitter/util.py/Authenticate._validate_creds_file