def crosshair(self,
                  duration=1.0,     # duration for which this object will be displayed
                                    # if this is a string, the stimulus will be displayed until the corresponding event is generated
                                    # if this is a list of [number,string], the stimulus will at least be displayed for <number> seconds, but needs to confirmed with the respective event
                                    # if this is 0, the write will be non-blocking and you have to .destroy() the return value of this function manually  
                  block=True,       # whether this function should only return once the duration is over
                  # additional parameters
                  pos=(0,0),        # position of the crosshair
                  size=0.25,        # size of the crosshair
                  width=0.01,       # thickness of the rectangles
                  color=(0,0,0,1),  # color of the crosshair
                  parent=None       # the renderer to use for displaying the object
                  ):        
        """Draw a crosshair."""
        obj1 = self._engine.direct.gui.OnscreenImage.OnscreenImage(image='blank.tga',pos=(pos[0],0,pos[1]),scale=(size,1,width),color=color,parent=parent)
        self._to_destroy.append(obj1)
        obj1.setTransparency(self._engine.pandac.TransparencyAttrib.MAlpha)
        obj2 = self._engine.direct.gui.OnscreenImage.OnscreenImage(image='blank.tga',pos=(pos[0],0,pos[1]),scale=(width,1,size),color=color,parent=parent)
        self._to_destroy.append(obj2)
        obj2.setTransparency(self._engine.pandac.TransparencyAttrib.MAlpha)
        if self.implicit_markers:
            self.marker(252)
        if block:
            if type(duration) == list or type(duration) == tuple:
                self.sleep(duration[0])
                self.waitfor(duration[1])
            elif type(duration) == str:
                self.waitfor(duration)
            else:
                self.sleep(duration)
            self._destroy_object([obj1,obj2],253)
        else:
            if duration > 0:
                self._engine.base.taskMgr.doMethodLater(duration, self._destroy_object, 'ConvenienceFunctions, remove_crosshair',extraArgs=[[obj1,obj2],253])
            return self.destroy_helper([obj1,obj2])
dataset/ETHPy150Open sccn/SNAP/src/framework/basicstimuli.py/BasicStimuli.crosshair/original