def TTupleOf(*val_types):
  """Checks if a given value is a list with the proper size and its
     elements match the given types.

  """
  desc = WithDesc("Tuple of %s" / Parens(', '.join(str(v) for v in val_types)))
  return desc(TAnd(TOr(TTuple, TList), TIsLength(len(val_types)),
                   TItems(val_types)))
dataset/ETHPy150Open ganeti/ganeti/lib/ht.py/TTupleOf/operator `%` -> `/`