code: def get_statistics_html(
      lhs_statistics: statistics_pb2.DatasetFeatureStatisticsList,
      rhs_statistics: Optional[
          statistics_pb2.DatasetFeatureStatisticsList
      ] = None,
      lhs_name: Text = "lhs_statistics",
      rhs_name: Text = "rhs_statistics",
      allowlist_features: Optional[List[types.FeaturePath]] = None,
      denylist_features: Optional[List[types.FeaturePath]] = None,
  ) -> Text:
      """Build the HTML for visualizing the input statistics using Facets.
  
      Args:
        lhs_statistics: A DatasetFeatureStatisticsList protocol buffer.
        rhs_statistics: An optional DatasetFeatureStatisticsList protocol buffer to
          compare with lhs_statistics.
        lhs_name: Name to use for the lhs_statistics dataset if a name is not
          already provided within the protocol buffer.
        rhs_name: Name to use for the rhs_statistics dataset if a name is not
          already provided within the protocol buffer.
        allowlist_features: Set of features to be visualized.
        denylist_features: Set of features to ignore for visualization.
  
      Returns:
        HTML to be embedded for visualization.
  
      Raises:
        TypeError: If the input argument is not of the expected type.
        ValueError: If the input statistics protos does not have only one dataset.
      """
      combined_statistics = _get_combined_statistics(
          lhs_statistics,
          rhs_statistics,
          lhs_name,
          rhs_name,
          allowlist_features,
          denylist_features,
      )
      if (
          len(combined_statistics.datasets) == 1
          and combined_statistics.datasets[0].num_examples == 0
      ):
          return "<p>Empty dataset.</p>"
  
      protostr = base64.b64encode(
          combined_statistics.SerializeToString()
      ).decode("utf-8")
  
      # pylint: disable=line-too-long,anomalous-backslash-in-string
      # Note that in the html template we currently assign a temporary id to the
      # facets element and then remove it once we have appended the serialized proto
      # string to the element. We do this to avoid any collision of ids when
      # displaying multiple facets output in the notebook.
      #
      # Note that a string literal including '</script>' in a <script> tag needs to
      # escape it as <\/script> to avoid early closing the wrapping <script> tag.
      html_template = """<iframe id='facets-iframe' width="100%" height="500px"></iframe>
          <script>
          facets_iframe = document.getElementById('facets-iframe');
          facets_html = '<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.3.3/webcomponents-lite.js"><\/script><link rel="import" href="https://raw.githubusercontent.com/PAIR-code/facets/master/facets-dist/facets-jupyter.html"><facets-overview proto-input="protostr"></facets-overview>';
          facets_iframe.srcdoc = facets_html;
           facets_iframe.id = "";
           setTimeout(() => {
             facets_iframe.setAttribute('height', facets_iframe.contentWindow.document.body.offsetHeight + 'px')
           }, 1500)
           </script>"""
      # pylint: enable=line-too-long
      html = html_template.replace("protostr", protostr)
  
      return html
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import collections
  import sys
  from typing import Dict, Iterable, List, Optional, Text, Tuple, Union
  import pandas
  from tensorflow_data_validation import types
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 10 for calling a global function with example usage: get_statistics_html(lhs_statistics, rhs_statistics, lhs_name, rhs_name, allowlist_features, denylist_features) and returns: html, str