class_docstr: WIT widget for colab.
class_docstr_tok: ["WIT","widget","for","colab","."]
code: def set_examples(self, examples):
      if self.set_examples_in_progress:
          print("Cannot set examples while transfer is in progress.")
          return
      self.set_examples_in_progress = True
      base.WitWidgetBase.set_examples(self, examples)
      # If this is called after rendering, use a BroadcastChannel to send
      # the updated examples to the visualization. Inside of the ctor, no action
      # is necessary as the rendering handles all communication.
      if self._rendering_complete:
          # Use BroadcastChannel to allow this call to be made in a separate colab
          # cell from the cell that displays WIT.
          channel_str = (
              """(new BroadcastChannel('updateExamples{}'))""".format(
                  self.id
              )
          )
          eval_js_str = channel_str + ".postMessage({data})"
          self._set_examples_looper(eval_js_str)
          self._generate_sprite()
          self.set_examples_in_progress = False
  
imports: import json
  import math
  import tensorflow
  from IPython import display
  from google.colab import output
  from witwidget.notebook import base
label_desc: Use image node_id 4 for calling the WitWidget obj's underlying member method code with example usage: obj.set_examples(examples) without return types