if isinstance(model, nx.Model):
models = [model]
elif isinstance(model, list) or isinstance(model, tuple):
models = list(model)
else:
raise ValueError("`model` must be a model, list, or tuple of models")
// make list of tournaments
After Change
tournaments = nx.tournament_all()
elif nx.isint(tournament) or nx.isstring(tournament):
tournaments = [tournament]
elif isinstance(tournament, list) or isinstance(tournament, tuple):
tournaments = tournament
else:
msg = "`tournament` must be an integer, string, list, tuple, or None."
raise ValueError(msg)
tournaments = [nx.tournament_str(t) for t in tournaments]
if len(tournaments) != len(set(tournaments)):
raise ValueError("`tournament` cannot contain duplicates")