from dimod.core.sampler import Sampler
from dimod.core.composite import Composite
from dimod.core.structured import Structured
from dimod.decorators import bqm_structured


class StructureComposite(Sampler, Composite, Structured):
    """Creates a structured composed sampler from an unstructured sampler.

    todo
    """
    def __init__(self, sampler, nodelist, edgelist):
        Sampler.__init__(self)
        Composite.__init__(self, sampler)
        Structured.__init__(self, nodelist, edgelist)

    @bqm_structured
    def sample(self, bqm, **sample_kwargs):
        return self.child.sample(bqm, **sample_kwargs)

@@ -303,205 +303,524 @@
 er.%0A
-%0A    todo%0A    %22%22%22%0A    def __init__(self, sampler, nodelist, edgelist):%0A        Sampler.__init__(self)%0A        Composite.__init__(self, sampler)%0A        Structured.__init__(self, nodelist, edgelist)
+    %22%22%22%0A    # we will override these in the __init__, but because they are abstract properties we need to%0A    # signal that we are overriding them%0A    edgelist = None%0A    nodelist = None%0A    children = None%0A%0A    def __init__(self, sampler, nodelist, edgelist):%0A        self.children = %5Bsampler%5D%0A        self.nodelist = nodelist%0A        self.edgelist = edgelist%0A%0A    @property%0A    def parameters(self):%0A        return self.child.parameters%0A%0A    @property%0A    def properties(self):%0A        return self.child.properties
 %0A%0A  

Update Structure composite to use the new abc