def create_set(self, set_id, etype, entities):
if etype not in {"<STR_LIT>", "<STR_LIT>", "<STR_LIT>"}:<EOL><INDENT>raise ValueError("<STR_LIT>" + str(etype))<EOL><DEDENT>payload = "<STR_LIT>" + etype + "<STR_LIT>" + etype + "<STR_LIT>"<EOL>for e in entities:<EOL><INDENT>if e.etype != etype:<EOL><INDENT>msg =  "<STR_LIT>" + e.etype + "<STR_LIT>"<EOL>msg += "<STR_LIT>" + etype + "<STR_LIT:'>"<EOL>raise ValueError(msg)<EOL><DEDENT>payload += set_id + '<STR_LIT:\t>' + e.entity_id + '<STR_LIT:\n>'<EOL><DEDENT>r = fapi.upload_entities(self.namespace, self.name,<EOL>payload, self.api_url)<EOL>fapi._check_response_code(r, <NUM_LIT>)<EOL>
Create a set of entities and upload to FireCloud.

        Args
            etype (str): one of {"sample, "pair", "participant"}
            entities: iterable of firecloud.Entity objects.