function canCopy(element, elements) {
    return rules.allowed('element.copy', {
      element: element,
      elements: elements
    });
  }
Create a tree-like structure from elements.

@example

```javascript
tree: {
 0: [
   { id: 'Shape_1', priority: 1, ... },
   { id: 'Shape_2', priority: 1, ... },
   { id: 'Connection_1', source: 'Shape_1', target: 'Shape_2', priority: 3, ... },
   ...
 ],
 1: [
   { id: 'Shape_3', parent: 'Shape1', priority: 1, ... },
   ...
 ]
};
```

@param {Element[]} elements

@return {Object}