function fromPaths(paths, parent, type) {
  assert.ok(
    paths.every(n => n instanceof NodePath),
    'Every element in the array should be a NodePath'
  );

  return new Collection(paths, parent, type);
}
Creates a new collection from an array of node paths.

If type is passed, it will create a typed collection if such a collection
exists. The nodes or path values must be of the same type.

Otherwise it will try to infer the type from the path list. If every
element has the same type, a typed collection is created (if it exists),
otherwise, a generic collection will be created.

@ignore
@param {Array} paths An array of paths
@param {Collection} parent A parent collection
@param {Type} type An AST type
@return {Collection}