(self, sketch=None, sketch_id=None)
Set the sketch for the search template.

        Args:
            sketch (sketch.Sketch): an optional sketch object to use as the
                sketch object for the search template.
            sketch_id (int): an optional sketch ID to use as the sketch ID
                for the search template.

        Raises:
            ValueError: If neither a sketch nor a sketch ID is set.
Set the sketch for the search template.
Set the sketch for the search template .
def set_sketch(self, sketch=None, sketch_id=None):
        """Set the sketch for the search template.

        Args:
            sketch (sketch.Sketch): an optional sketch object to use as the
                sketch object for the search template.
            sketch_id (int): an optional sketch ID to use as the sketch ID
                for the search template.

        Raises:
            ValueError: If neither a sketch nor a sketch ID is set.
        """
        if not sketch and not sketch_id:
            raise ValueError('Either sketch or sketch ID needs to be set.')

        if sketch:
            self._sketch_id = sketch
        elif isinstance(sketch_id, int):
            self._sketch_id = sketch_id
        else:
            raise ValueError(
                'Sketch needs to be set, or an integer value for '
                'a sketch ID.')
def set_sketch ( self , sketch = None , sketch_id = None ) : if not sketch and not sketch_id : raise ValueError ( 'Either sketch or sketch ID needs to be set.' ) if sketch : self . _sketch_id = sketch elif isinstance ( sketch_id , int ) : self . _sketch_id = sketch_id else : raise ValueError ( 'Sketch needs to be set, or an integer value for ' 'a sketch ID.' )