code: def _populate_sequence_length_histogram(
      nls: statistics_pb2.NaturalLanguageStatistics,
      accumulator: _PartialNLStats,
      num_quantiles_histogram_buckets: int,
  ):
      """Populate sequence length histogram."""
  
      (
          quantiles,
          weights,
      ) = accumulator.sequence_length_quantiles.GetQuantilesAndCumulativeWeights(
          num_quantiles_histogram_buckets
      )
      quantiles = quantiles.flatten().to_numpy(zero_copy_only=False)
      weights = weights.flatten().to_numpy(zero_copy_only=False)
  
      if quantiles.size:
          quantiles_histogram = (
              quantiles_util.generate_quantiles_histogram(
                  quantiles, weights
              )
          )
          nls.sequence_length_histogram.CopyFrom(quantiles_histogram)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Dict, Iterable, List, Optional, Set, Text, Union
  import pyarrow
  import six
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import quantiles_util
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_data_validation.utils import vocab_util
  from tfx_bsl import sketches
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 9 for calling a global function with example usage: _populate_sequence_length_histogram(nls, accumulator, num_quantiles_histogram_buckets) without return types