function getOrderOfTraversing(codePath, options, callback) {
	const retv = [];

	codePath.traverseSegments(options, (segment, controller) => {
		retv.push(segment.id);
		if (callback) {
			callback(segment, controller); // eslint-disable-line n/callback-return -- At end of inner function
		}
	});

	return retv;
}
Traverses a given code path then returns the order of traversing.
@param {CodePath} codePath A code path to traverse.
@param {Object|undefined} [options] The option object of
     `codePath.traverseSegments()` method.
@param {Function|undefined} [callback] The callback function of
     `codePath.traverseSegments()` method.
@returns {string[]} The list of segment's ids in the order traversed.