code: def _clear_histograms(
      dataset: statistics_pb2.DatasetFeatureStatistics,
  ) -> Tuple[statistics_pb2.DatasetFeatureStatistics, bool]:
      """Returns input with cleared histograms returns true if any were set."""
      has_hist = False
      result = statistics_pb2.DatasetFeatureStatistics()
      result.MergeFrom(dataset)
      for feature in result.features:
          if feature.HasField("num_stats"):
              has_hist = (
                  _clear(feature.num_stats, "histograms") or has_hist
              )
              has_hist = (
                  _clear(
                      feature.num_stats.weighted_numeric_stats,
                      "histograms",
                  )
                  or has_hist
              )
              common_stats = feature.num_stats.common_stats
          elif feature.HasField("string_stats"):
              common_stats = feature.string_stats.common_stats
          elif feature.HasField("struct_stats"):
              common_stats = feature.struct_stats.common_stats
          elif feature.HasField("bytes_stats"):
              common_stats = feature.bytes_stats.common_stats
          else:
              common_stats = None
          if common_stats is not None:
              has_hist = (
                  _clear(common_stats, "feature_list_length_histogram")
                  or has_hist
              )
              has_hist = (
                  _clear(common_stats, "num_values_histogram")
                  or has_hist
              )
          for custom in feature.custom_stats:
              has_hist = _clear(custom, "histogram") or has_hist
      return result, has_hist
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import traceback
  from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union
  from absl.testing import absltest
  import apache_beam
  from apache_beam.testing import util
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _clear_histograms(dataset) and returns: result,  has_hist