expects a list of 2-tuples
423436
def set_values(self, values):
        """"""
        self.values = values
        self.height = len(self.values) * 14
        self._max = max(rec[1] for rec in values) if values else dt.timedelta(0)
172692
def _make_tuple(self, env):
    """"""
    t = runtime.Tuple(self, env, dict2tuple)
    # A tuple also provides its own schema spec
    schema = schema_spec_from_tuple(t)
    t.attach_schema(schema)
    return t
1045556
private static Collection<Tuple> getTuples( List<VarDef> varDefs, int varStart, int varEnd, int tupleSize)
    {
    Collection<Tuple> tuples = new ArrayList<Tuple>();

    // For each variable up to the last included...
    for( int i = varStart; i < varEnd; i++)
      {
      // Combine each valid value...
      VarDef                nextVar   = varDefs.get(i);
      Iterator<VarValueDef> values    = nextVar.getValidValues();
      if( !values.hasNext())
        {
        throw new IllegalStateException( "Can't complete tuples -- no valid values defined for var=" + nextVar);
        }

      // With all subtuples from the remaining variables.
      Collection<Tuple> subTuples =
        tupleSize==1
        ? null
        : getTuples( varDefs, i + 1, varEnd + 1, tupleSize - 1);

      // Only one variable to combine?
      if( subTuples == null)
        {
        // Yes, return list of 1-tuples for this variable.
        while( values.hasNext())
          {
          tuples.add( new Tuple( new VarBindingDef( nextVar, values.next())));
          }
        }

      // Any compatible subtuples for remaining variables?
      else if( !subTuples.isEmpty())
        {
        // Yes, add all compatible combinations with values for this variable.
        while( values.hasNext())
          {
          VarBindingDef nextBinding = new VarBindingDef( nextVar, values.next());
          for( Tuple subTuple : subTuples)
            {
            Tuple nextTuple = new Tuple( nextBinding).addAll( subTuple);
            if( nextTuple.isCompatible())
              {
              tuples.add( nextTuple);
              }
            }
          }
        }
      }
    
    return tuples;
    }
547705
public final Tuple2<Tuple1<T1>, Tuple5<T2, T3, T4, T5, T6>> split1() {
        return new Tuple2<>(limit1(), skip1());
    }
1194171
def ensure_tuple(obj):
    """"""
    if obj is None:
        return tuple()
    if isinstance(obj, Iterable) and not isinstance(obj, six.string_types):
        return tuple(obj)
    return obj,
281379
def asTuple(self):
        
        t = []
        k = sorted(self.keys())
        for key in k:
            t.append((key, self[key]))
        return tuple(t)
500779
def make_tuple(obj, cast=True):
    
    if isinstance(obj, tuple):
        return tuple(obj)
    elif is_lazy_iterable(obj):
        return tuple(obj)
    elif isinstance(obj, (list, set)) and cast:
        return tuple(obj)
    else:
        return (obj,)
230055
public final Tuple2<Tuple3<T1, T2, T3>, Tuple0> split3() {
        return new Tuple2<>(limit3(), skip3());
    }
150270
function tuple4Of(a, b, c, d) {
    var self = getInstance(this, tuple4Of);
    self.types = rest(arguments);
    return self;
}
474607
def add(v1, v2):
    '''
    '''
    return tuple(a + b for a, b in zip(v1, v2))
1104256
def ensure_list(value: Union[T, Sequence[T]]) -> Sequence[T]:
    """"""
    if value is None:
        return []
    return value if isinstance(value, list) else [value]
756436
public final Tuple2<Tuple4<T1, T2, T3, T4>, Tuple0> split4() {
        return new Tuple2<>(limit4(), skip4());
    }
385108
def as_tuple(self, value):
        """"""
        if isinstance(value, list):
            value = tuple(value)
        return value
906706
def listify(arg):
    
    if isinstance(arg, (set, tuple)):
        # if it is a set or tuple make it a list
        return list(arg)
    if not isinstance(arg, list):
        return [arg]
    return arg
1319933
def as_tuple(obj):
    "  "

    if not obj:
        return tuple()

    if isinstance(obj, (tuple, set, list)):
        return tuple(obj)

    if hasattr(obj, '__iter__') and not isinstance(obj, dict):
        return obj

    return obj,
83419
public static <T1, T2> Tuple2<T1, T2> create(final T1 v1, final T2 v2) {
        return new Tuple2<T1, T2>(v1, v2);
    }
1174107
public final Tuple2<Tuple2<T1, T2>, Tuple10<T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>> split2() {
        return new Tuple2<>(limit2(), skip2());
    }