function getChildren(_parent) {
    const children = trace.getChildren(_parent.id)
    return children.filter(function (item) {
      if (exact && options && options.exclude) {
        return options.exclude.indexOf(item.name) === -1
      }
      return true
    })
  }
This function is used to verify that a tree of trace segments matches an
expected tree of segment names. For example, if the trace looks like (i.e
the `parent` parameter):

```js
{
  name: 'root-segment',
  children: [
   {
     name: 'child 1',
     children: [
       {
         name: 'grandchild 1',
         children: [
           {
             name: 'great-grandchild',
             children: []
           }
         ]
       },
       {
         name: 'grandchild 2',
         children: []
       }
     ]
   },
   {
     name: 'child 2',
     children: []
   }
  ]
}
```

Then the provided `expected` parameter should look like:

```js
[
  'root-segment',
  [
    'child 1',
    [
     'grandchild 1',
     ['great-grandchild],
     'grandchild 2'
    ],
    'child 2'
  ],
]
```

Ordering of the elements in the `expected` parameter is significant when
`options.exact = true`. Regardless of the `exact` value, ordering of elements
is significant to indicate the nesting order. Any string immediately
followed by an array of strings indicates that the first string is a parent
element, and the subsequent array of strings is its child elements.

@param {Trace} trace             Transaction trace
@param {TraceSegment} parent     Parent segment
@param {Array} expected          Array of strings that represent segment names.
                                 If an item in the array is another array, it
                                 represents children of the previous item.
@param {boolean} options.exact   If true, then the expected segments must match
                                 exactly, including their position and children on all
                                 levels.  When false, then only check that each child
                                 exists.
@param {array} options.exclude   Array of segment names that should be excluded from
                                 validation.  This is useful, for example, when a
                                 segment may or may not be created by code that is not
                                 directly under test.  Only used when `exact` is true.
@param {object} [deps] Injected dependencies.
@param {object} [deps.assert] Assertion library to use.