Converts list with pairs of nodes to list with pairs of node paths
    (strings). Used mainly for debugging.
491402
def StringizeLibSymlinks(symlinks):
    """"""
    if SCons.Util.is_List(symlinks):
        try:
            return [ (k.get_path(), v.get_path()) for k,v in symlinks ]
        except (TypeError, ValueError):
            return symlinks
    else:
        return symlinks
378361
public static String[] strListToArray(List<String> list) {
		if (list == null)
			return new String[0];
		return list.toArray(new String[list.size()]);
	}
1163482
def _format_listnodes(self, listnodes):
        
        fields = list()
        for name, node in listnodes:
            fields.append(('--', '', '', '--'))
            fields.append(('', '**%s(ListNode)**' % name, '', ''))
            for link in node.get_links():
                linked_model = link['mdl'](super_context)
                null = self._marker_true if link['null'] is True else self._marker_false
                fields.append((self._nodelist_field_prefix, link['field'],
                               '%s()' % linked_model.title, null))
            fields.extend(self._get_model_fields(node, self._nodelist_field_prefix))
        return fields
181888
public static <T,W> List<W> listSecond(List<Pair<T, W>> list) {
        ArrayList<W> ts = new ArrayList<W>();
        for (Pair<T, W> twPair : list) {
            ts.add(twPair.getSecond());
        }
        return ts;
    }
574428
private static List<Integer> convertList(List<String> list) {
        if (list == null) {
            return null;
        }
        List<Integer> ret = new ArrayList<Integer>(list.size());
        for (String v : list) {
            ret.add(StringUtils.toInt(v));
        }

        return ret;
    }
530104
def children_to_list(node):
    """"""
    if node['type'] == 'item' and len(node['children']) == 0:
        del node['children']
    else:
        node['type'] = 'folder'
        node['children'] = list(node['children'].values())
        node['children'].sort(key=lambda x: x['name'])
        node['children'] = map(children_to_list, node['children'])
    return node
345559
public static List<ChildNumber> parsePath(@Nonnull String path) {
        String[] parsedNodes = path.replace("M", "").split("/");
        List<ChildNumber> nodes = new ArrayList<>();

        for (String n : parsedNodes) {
            n = n.replaceAll(" ", "");
            if (n.length() == 0) continue;
            boolean isHard = n.endsWith("H");
            if (isHard) n = n.substring(0, n.length() - 1);
            int nodeNumber = Integer.parseInt(n);
            nodes.add(new ChildNumber(nodeNumber, isHard));
        }

        return nodes;
    }
816010
def from_lists(cls, path:PathOrStr, fnames:FilePathList, labels:Collection[str], valid_pct:float=0.2,
                   item_cls:Callable=None, **kwargs):
        ""
        item_cls = ifnone(item_cls, ImageList)
        fname2label = {f:l for (f,l) in zip(fnames, labels)}
        src = (item_cls(fnames, path=path).split_by_rand_pct(valid_pct)
                                .label_from_func(lambda x:fname2label[x]))
        return cls.create_from_ll(src, **kwargs)
1195355
private static Iterable<String> toIterable(final String[] strings) {
        if (strings == null) {
            return null;
        }

        return Arrays.asList(strings);
    }
143317
public static List<Element> nodeListToList(NodeList<Element> nodelist) {

        List<Element> result = Lists.newArrayList();
        for (int i = 0; i < nodelist.getLength(); i++) {
            result.add(nodelist.getItem(i));
        }
        return result;
    }
535814
def replace_strings_in_list(array_of_strigs, replace_with_strings):
    ""
    potentially_nested_list = [replace_with_strings.get(s) or s for s in array_of_strigs]
    return list(flatten(potentially_nested_list))
882682
static public String listToJSONString(List<?> list) {
		if (list == null || list.size() == 0) {
			return "[]";
		}
		StringBuilder sb = new StringBuilder("[");
		for (Object o : list) {
			buildAppendString(sb, o).append(',').append(' ');
		}
		return sb.delete(sb.length() - 2, sb.length()).append(']').toString();
	}
33143
def toListString(value):
        
        if TypeConverters._can_convert_to_list(value):
            value = TypeConverters.toList(value)
            if all(map(lambda v: TypeConverters._can_convert_to_string(v), value)):
                return [TypeConverters.toString(v) for v in value]
        raise TypeError("Could not convert %s to list of strings" % value)
84966
def _nodes_to_values(self):
        
        def is_none(slice):
            return slice[0] == -1 and slice[1] == -1

        def get(slice):
            return self.string[slice[0]:slice[1]]

        return [(varname, get(slice), slice) for varname, slice in self._nodes_to_regs() if not is_none(slice)]
1050500
private static String[] getPathStrings(String commaSeparatedPaths) {
    int length = commaSeparatedPaths.length();
    int curlyOpen = 0;
    int pathStart = 0;
    boolean globPattern = false;
    List<String> pathStrings = new ArrayList<String>();
    
    for (int i=0; i<length; i++) {
      char ch = commaSeparatedPaths.charAt(i);
      switch(ch) {
        case '{' : {
          curlyOpen++;
          if (!globPattern) {
            globPattern = true;
          }
          break;
        }
        case '}' : {
          curlyOpen--;
          if (curlyOpen == 0 && globPattern) {
            globPattern = false;
          }
          break;
        }
        case ',' : {
          if (!globPattern) {
            pathStrings.add(commaSeparatedPaths.substring(pathStart, i));
            pathStart = i + 1 ;
          }
          break;
        }
      }
    }
    pathStrings.add(commaSeparatedPaths.substring(pathStart, length));
    
    return pathStrings.toArray(new String[0]);
  }
776601
function nodeListToArray (nodes) {
    if ($.env.name !== 'IE' || $.env.version > 9) {
      return prototypeSlice.call(nodes);
    }

    // IE 9 and below call use Array.prototype.slice.call against
    // a NodeList, hence the following
    var array = [];

    for (var i=0, num=nodes.length; i<num; ++i) {
      array.push(nodes[i]);
    }

    return array;
  }
51475
def nodeListGetRawString(self, list, inLine):
        
        if list is None: list__o = None
        else: list__o = list._o
        ret = libxml2mod.xmlNodeListGetRawString(self._o, list__o, inLine)
        return ret