class_docstr: View of statistics for multiple datasets (slices).
class_docstr_tok: ["View","of","statistics","for","multiple","datasets","(","slices",")","."]
docstr: Initializes internal mappings.
docstr_tok: ["Initializes","internal","mappings","."]
code: def _init_index(self):
      """Initializes internal mappings."""
      # Lazily initialize in case we don't need an index.
      if self._initialized:
          return
      for dataset in self._statistics.datasets:
          if dataset.name in self._slice_map:
              raise ValueError("Duplicate slice name %s" % dataset.name)
          self._slice_map[dataset.name] = DatasetView(dataset)
      self._initialized = True
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from typing import Dict, Iterable, Optional, Sequence, Text, Tuple, Union
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.utils import io_util
  from tfx_bsl import statistics
  from tfx_bsl.arrow import array_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling the DatasetListView obj's underlying member method code with example usage: obj._init_index() without return types