class_docstr: Writer class for HDF5 files consumed by HDF5FXRateReader.
      
docstr: Write content of /index.
          
docstr_tok: ["Write","content","of","\/index","."]
code: def _write_index_group(self, dts, currencies):
      """Write content of /index."""
      if not is_sorted_ascending(dts):
          raise ValueError("dts is not sorted")
  
      for c in currencies:
          if not isinstance(c, str) or len(c) != 3:
              raise ValueError("Invalid currency: {!r}".format(c))
  
      index_group = self._group.create_group(INDEX)
  
      self._log_writing(INDEX, DTS)
      index_group.create_dataset(DTS, data=dts.astype("int64"))
  
      self._log_writing(INDEX, CURRENCIES)
      index_group.create_dataset(
          CURRENCIES, data=currencies.astype("S3")
      )
  
imports: from interface import implements
  import h5py
  from logbook import Logger
  import numpy
  import pandas
  from zipline.utils.memoize import lazyval
  from zipline.utils.numpy_utils import bytes_array_to_native_str_object_array
  from .base import FXRateReader, DEFAULT_FX_RATE
  from .utils import check_dts, is_sorted_ascending
label_desc: Use image node_id 4 for calling the HDF5FXRateWriter obj's underlying member method code with example usage: obj._write_index_group(dts, currencies) without return types