WPF Help with local namespace

Hi all, im trying to setup a WPF form that uses HierarchicalDataTemplate where I need to set the DataType to a custom class defined in the script. like this:

		    <HierarchicalDataTemplate DataType="{x:Type RecordSetFolder}"

where RecordSetFolder is a class defined similar to this within my script.py:

class RecordSetFolder:
    def __init__(self, name):
        self.name = name
        self.files = ObservableCollection[RecordSetFile]()

However I cannot get it to work at all. Can anyone offer any pointers?

Here is a stackoverflow thread with a similar question and no answer: