def args_from_id(id, arg_ranges):
  """Convert a single id number to the corresponding set of arguments"""
  args = list()
  for arg_range in arg_ranges:
    i = id % len(arg_range)
    id = id // len(arg_range)
    args.append(arg_range[i])
  return tuple(args)