def METHOD_NAME(self, gc, view_bounds=None, mode="default"):
    """ Try running the compiled code with the graphics context as `gc`
    """
    with gc:
        try:
            self.error = ""
            start_time = time.time()
            exec(self._draw_code, {}, {"gc": gc})
            self.last_draw_time = time.time() - start_time
        except Exception as exc:
            self.error = str(exc)