def generate_match_id(self):
    avail_chars = (string.ascii_uppercase + string.digits)
    id_list = []
    for _ in range(6):
        id_list.append(random.choice(avail_chars))
    generated_id = ''.join(id_list)
    if (generated_id not in self.active_matches):
        return generated_id
    return self.generate_match_id()
def generate_match_id(self):
    avail_chars = (string.ascii_uppercase + string.digits)
    id_list = []
    for _ in range(6):
        id_list.append(random.choice(avail_chars))
    generated_id = .join(id_list)
    if (generated_id not in self.active_matches):
        return generated_id
    return self.generate_match_id()