def METHOD_NAME(target):
    from labgrid.strategy import GraphStrategy
    class TestStrategy(GraphStrategy):
        def state_Root(self):
            pass
        @GraphStrategy.depends('Root')
        def state_A1(self):
            pass
        @GraphStrategy.depends('Root')
        def state_A2(self):
            pass
        @GraphStrategy.depends('A1', 'A2')
        def state_B(self):
            pass
        @GraphStrategy.depends('B')
        def state_C1(self):
            pass
        @GraphStrategy.depends('B')
        def state_C2(self):
            pass
        @GraphStrategy.depends('C1', 'C2')
        def state_D(self):
            pass
    return TestStrategy(target, 'strategy')