class_docstr: WIT widget base class for common code between Jupyter and Colab.
code: def json_to_proto(self, json):
      ex = (
          tf.train.SequenceExample()
          if self.config.get("are_sequence_examples")
          else tf.train.Example()
      )
      json_format.Parse(json, ex)
      return ex
  
imports: import base64
  import json
  import googleapiclient.discovery
  import os
  import logging
  import multiprocessing
  import tensorflow
  from IPython import display
  from google.protobuf import json_format
  from numbers import Number
  from oauth2client.client import GoogleCredentials
  from six import ensure_str
  from six import integer_types
  from utils import inference_utils
label_desc: Use image node_id 5 for calling the WitWidgetBase obj's underlying member method code with example usage: obj.json_to_proto(json) and returns: ex