class_docstr: Writer class for HDF5 files consumed by HDF5FXRateReader.
      
docstr: Write content of /data.
          
docstr_tok: ["Write","content","of","\/data","."]
code: def _write_data_group(self, dts, currencies, data, chunks):
      """Write content of /data."""
      data_group = self._group.create_group(DATA)
  
      expected_shape = (len(dts), len(currencies))
      for rate, quote, array in data:
          if array.shape != expected_shape:
              raise ValueError(
                  "Unexpected shape for rate={}, quote={}."
                  "\nExpected shape: {}. Got {}.".format(
                      rate, quote, expected_shape, array.shape
                  )
              )
  
          self._log_writing(DATA, rate, quote)
          target = data_group.require_group("/".join((rate, quote)))
  
          # Transpose the rates array so that the hdf5 file holds arrays
          # with currencies as row labels and dates as column labels. This
          # helps with compression, as the *rows* (rather than the columns)
          # all have similar values, which lends itself to the HDF5 file's
          # C-contiguous storage.
          target.create_dataset(
              RATES,
              data=array.transpose(),
              chunks=chunks,
              compression="lzf",
              shuffle=True,
          )
  
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 5 for calling the HDF5FXRateWriter obj's underlying member method code with example usage: obj._write_data_group(dts, currencies, data, chunks) without return types