code: def get_js(
      array1: np.ndarray,
      array2: np.ndarray,
      hist_type: schema_pb2.HistogramSelection.Type,
      quantiles_buckets: int = 10,
  ) -> float:
      opts = tfdv.StatsOptions()
      opts.num_quantiles_histogram_buckets = quantiles_buckets
      stats1 = tfdv.generate_statistics_from_dataframe(
          pd.DataFrame({"foo": array1}), stats_options=opts
      )
      stats2 = tfdv.generate_statistics_from_dataframe(
          pd.DataFrame({"foo": array2}), stats_options=opts
      )
      schema = tfdv.infer_schema(stats1)
      f = tfdv.get_feature(schema, "foo")
      f.drift_comparator.jensen_shannon_divergence.threshold = 0
      f.drift_comparator.jensen_shannon_divergence.source.type = (
          hist_type
      )
      anomalies = tfdv.validate_statistics(
          stats1, schema, previous_statistics=stats2
      )
      return anomalies.drift_skew_info[0].drift_measurements[0].value
  
file_path: data-validation/tensorflow_data_validation/integration_tests/drift_skew_metrics_test.py
imports: from absl import flags
  from absl.testing import absltest
  import numpy
  import pandas
  import tensorflow_data_validation
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: get_js(array1, array2, hist_type, quantiles_buckets) and returns: anomalies