def setup(self):
        # create 4 preview curves
        self.create_frame_curve()

        for side in self.sides:
            self.create_preview_curve(side)
            # and one for the edge
            self.create_preview_curve(side)

            # set main curve to reference
            preview_curve = self.preview_curves[side][0]
            preview_curve.setAttr("overrideEnabled", 1)
            preview_curve.setAttr("overrideColor", 6)

            # set edge curve to template
            edge_curve = self.preview_curves[side][1]
            edge_curve.setAttr("overrideEnabled", 1)
            edge_curve.setAttr("overrideColor", 13)

            # parent the joints to the frame curve
            pm.parent(self.joints[side][0], self.frame_curve)
            pm.parent(self.joints[side][1], self.frame_curve)
            pm.parent(self.joints[side][2], self.frame_curve)
            pm.parent(self.joints[side][3], self.frame_curve)

        # parent it to the light
        pm.parent(
            self.frame_curve,
            self.light
        )

        self.frame_curve.setAttr('t', [0, 0, -0.5])
        self.frame_curve.setAttr('r', [0, 0, 0])
        self.frame_curve.setAttr('s', [1, 1, 1])

        self.create_barn_door()
        self.create_expression()

        # hide joints
        for side in self.sides:
            self.joints[side][0].v.set(0)
            self.joints[side][1].v.set(0)

            # and edge
            self.joints[side][2].v.set(0)
            self.joints[side][3].v.set(0)

        # group curves
        all_preview_curves = []
        map(all_preview_curves.extend, self.preview_curves.values())
        shapes_group = pm.group(
            all_preview_curves,
            n='%s_barndoor_preview_curves' % self.light.name()
        )

        self.store_node(shapes_group)

        # create script job
        self.create_script_job()

        # select the light again
        pm.select(self.light)
Handler that uses hotshot to store profile data.
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/auxiliary.py/BarnDoorSimulator.setup--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/handlers/profiler-hotshot.py/handler