def expandtree(self, model=None):
if model and not self.columns:<EOL><INDENT>schema = model.schema()<EOL>defaults = schema.columns(flags=orb.Column.Flags.AutoExpand).keys()<EOL>defaults += schema.collectors(flags=orb.Collector.Flags.AutoExpand).keys()<EOL><DEDENT>else:<EOL><INDENT>defaults = []<EOL><DEDENT>expand = self.expand or defaults<EOL>if not expand:<EOL><INDENT>return {}<EOL><DEDENT>def build_tree(parts, tree):<EOL><INDENT>tree.setdefault(parts[<NUM_LIT:0>], {})<EOL>if len(parts) > <NUM_LIT:1>:<EOL><INDENT>build_tree(parts[<NUM_LIT:1>:], tree[parts[<NUM_LIT:0>]])<EOL><DEDENT><DEDENT>tree = {}<EOL>for branch in expand:<EOL><INDENT>build_tree(branch.split('<STR_LIT:.>'), tree)<EOL><DEDENT>return tree<EOL>
Goes through the expand options associated with this context and
returns a trie of data.

:param model: subclass of <orb.Model> || None

:return: <dict>