docs: def plot(self, data):
      """ Plots a featire slice view on given data.
  
      Args:
        data: Can be one of:
            A string of sql query.
            A sql query module defined by "%%sql --module module_name".
            A pandas DataFrame.
          Regardless of data type, it must include the following columns:
            "feature": identifies a slice of features. For example: "petal_length:4.0-4.2".
            "count": number of instances in that slice of features.
          All other columns are viewed as metrics for its feature slice. At least one is required.
      """
      import IPython
  
      if ((sys.version_info.major > 2 and isinstance(data, str)) or
         (sys.version_info.major <= 2 and isinstance(data, basestring))):
        data = bq.Query(data)
  
      if isinstance(data, bq.Query):
        df = data.execute().result().to_dataframe()
        data = self._get_lantern_format(df)
      elif isinstance(data, pd.core.frame.DataFrame):
        data = self._get_lantern_format(data)
      else:
        raise Exception('data needs to be a sql query, or a pandas DataFrame.')
  
      HTML_TEMPLATE = """<link rel="import" href="/nbextensions/gcpdatalab/extern/lantern-browser.html" >
          <lantern-browser id="{html_id}"></lantern-browser>
          <script>
          var browser = document.querySelector('#{html_id}');
          browser.metrics = {metrics};
          browser.data = {data};
          browser.sourceType = 'colab';
          browser.weightedExamplesColumn = 'count';
          browser.calibrationPlotUriFn = function(s) {{ return '/' + s; }}
          </script>"""
      # Serialize the data and list of metrics names to JSON string.
      metrics_str = str(map(str, data[0]['metricValues'].keys()))
      data_str = str([{str(k): json.dumps(v) for k, v in elem.iteritems()} for elem in data])
      html_id = 'l' + datalab.utils.commands.Html.next_id()
      html = HTML_TEMPLATE.format(html_id=html_id, metrics=metrics_str, data=data_str)
      IPython.display.display(IPython.display.HTML(html))