ensure_tuple#
- composer.utils.ensure_tuple(x)[source]#
- Converts - xinto a tuple.- If - xis- None, then- tuple()is returned.
- If - xis a tuple, then- xis returned as-is.
- If - xis a list, then- tuple(x)is returned.
- If - xis a dict, then- tuple(v for v in x.values())is returned.
 - Otherwise, a single element tuple of - (x,)is returned.- Parameters
- x (Any) โ The input to convert into a tuple. 
- Returns
- tuple โ A tuple of - x.