Convert the list of tuples in obj.value to strings.
515648
def transformFromNative(cls, obj):
        
        if obj.isNative:
            obj.isNative = False
            transformed = []
            for tup in obj.value:
                transformed.append(periodToString(tup, cls.forceUTC))
            if len(transformed) > 0:
                tzid = TimezoneComponent.registerTzinfo(tup[0].tzinfo)
                if not cls.forceUTC and tzid is not None:
                    obj.tzid_param = tzid

            obj.value = ','.join(transformed)

        return obj
404752
def to_path_value(self, obj):
        
        if type(obj) == list:
            return ','.join(obj)
        else:
            return str(obj)
706315
def _to_array(value):
    """"""
    if isinstance(value, (tuple, list)):
        return array(value)
    elif isinstance(value, (float, int)):
        return np.float64(value)
    else:
        return value
390002
private List<Short> asShortList(Object value) {
        short[] values = (short[]) value;
        List<Short> list = new ArrayList<Short>(values.length);
        for (short shortValue : values) {
            list.add(shortValue);
        }
        return list;
    }
227023
def _SetValues(self, values):
    

    def _ToStr(value):
      """Convert individul list entries to string."""
      if isinstance(value, (list, tuple)):
        result = []
        for val in value:
          result.append(str(val))
        return result
      else:
        return str(value)

    # Row with identical header can be copied directly.
    if isinstance(values, Row):
      if self._keys != values.header:
        raise TypeError('Attempt to append row with mismatched header.')
      self._values = copy.deepcopy(values.values)

    elif isinstance(values, dict):
      for key in self._keys:
        if key not in values:
          raise TypeError('Dictionary key mismatch with row.')
      for key in self._keys:
        self[key] = _ToStr(values[key])

    elif isinstance(values, list) or isinstance(values, tuple):
      if len(values) != len(self._values):
        raise TypeError('Supplied list length != row length')
      for (index, value) in enumerate(values):
        self._values[index] = _ToStr(value)

    else:
      raise TypeError('Supplied argument must be Row, dict or list, not %s',
                      type(values))
1339231
def value_to_string(self, obj):
        
        value = self.value_from_object(obj)
        return self.get_prep_value(value)
868112
def to_value_list(original_strings, corenlp_values=None):
    
    assert isinstance(original_strings, (list, tuple, set))
    if corenlp_values is not None:
        assert isinstance(corenlp_values, (list, tuple, set))
        assert len(original_strings) == len(corenlp_values)
        return list(set(to_value(x, y) for (x, y)
                        in zip(original_strings, corenlp_values)))
    else:
        return list(set(to_value(x) for x in original_strings))
301275
def to_text_string(obj, encoding=None):
    """"""
    if PY2:
        # Python 2
        if encoding is None:
            return unicode(obj)
        else:
            return unicode(obj, encoding)
    else:
        # Python 3
        if encoding is None:
            return str(obj)
        elif isinstance(obj, str):
            # In case this function is not used properly, this could happen
            return obj
        else:
            return str(obj, encoding)
416006
def _str_targets(self):
        """"""
        def _slice_to_str(obj):
            if isinstance(obj, slice):
                start = "" if obj.start is None else str(obj.start.__index__())
                stop = "" if obj.stop is None else str(obj.stop.__index__())
                if obj.step is None:
                    return f"{start}:{stop}"
                else:
                    step = str(obj.step.__index__())
                    return f"{start}:{stop}:{step}"
            else:
                return obj.__index__()

        if isinstance(self.targets, tuple):
            return f"[{', '.join(_slice_to_str(idx for idx in self.targets))}]"
        else:
            return f"[{_slice_to_str(self.targets)}]"
159410
def serialize(self, value, **kwargs):
        """"""
        return [self.item_type.serialize(val, **kwargs) for val in value]
841625
def _convert_to_list(self, value, delimiters):
        
        if not value:
            return []
        if delimiters:
            return [l.strip() for l in value.split(delimiters)]
        return [l.strip() for l in value.split()]
626242
def as_array(obj):
    
    if hasattr(obj, "to_array"):
        return obj.to_array()
    elif isinstance(obj, (list, tuple)):
        return [as_array(x) for x in obj]
    elif isinstance(obj, dict):
        return {key:as_array(obj[key]) for key in obj.keys()}
    else:
        _json_dumps(obj)  # raises error if is wrong json
        return obj
332398
def to_python(self, value):
        
        if not value:
            value = []

        # If a list is set then validated its items
        if isinstance(value, list):
            py_list = self.validate_list(value)
        else:  # try to de-serialize value and expect list and then validate
            try:
                py_list = json.loads(value)

                if not isinstance(py_list, list):
                    raise TypeError

                self.validate_list(py_list)
            except (ValueError, TypeError):
                raise ValidationError(u'Must be a valid list of strings.')

        return py_list
826074
def get_tuple(self):
        """"""
        objType, objInstance = self.value

        if isinstance(objType, int):
            pass
        elif isinstance(objType, str):
            # turn it back into an integer
            objType = self.objectTypeClass()[objType]
        else:
            raise TypeError("invalid datatype for objType")

        # pack the components together
        return (objType, objInstance)
60418
def values(cls):
        
        if not hasattr(cls, '__values_'):
            cls.__values_ = tuple([c.value for c in list(cls)])
        return cls.__values_
114233
def convert_arguments(value):
    """"""
    if isinstance(value, (list, tuple)):
        return [
            CommandLineBinding(**item) if isinstance(item, dict) else item
            for item in value
        ]
    return shlex.split(value)
73964
function wrapValues (values, objtypes) {
  var result = [];
  for(var i=0; i < objtypes.length; i++) result.push(wrapValue(values[i], objtypes[i]));
  return result;
}