def __init__(self, default_value, allow_none=True, **metadata):
        from openmdao.main.vartree import VariableTree # Break import loop on VariableTree
        if isinstance(default_value, VariableTree):
            klass = default_value.__class__
            if 'iotype' in metadata:
                default_value._iotype = metadata['iotype']
            else:
                metadata['iotype'] = default_value.iotype
        else:
            raise TypeError('default_value must be an instance of VariableTree'
                            ' or subclass')

        metadata.setdefault('copy', 'deep')
        self._allow_none = allow_none
        self.klass = klass
        self._instance = Instance(klass=klass, allow_none=False, factory=None,
                                  args=None, kw=None, **metadata)
        self._instance.default_value = default_value
        super(VarTree, self).__init__(default_value, **metadata)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/datatypes/vtree.py/VarTree.__init__/original