class_docstr: HDF5IOTensor
code: def __init__(self, filename, spec=None, internal=False):
      with tf.name_scope("HDF5IOTensor"):
          columns, shapes, dtypes = core_ops.io_hdf5_readable_info(
              filename, shared=filename, container="HDF5IOTensor"
          )
          if tf.executing_eagerly():
              columns = tf.unstack(columns)
              shapes = [
                  tf.boolean_mask(
                      shape, tf.math.greater_equal(shape, 0)
                  )
                  for shape in tf.unstack(shapes)
              ]
              dtypes = [
                  tf.as_dtype(dtype.numpy())
                  for dtype in tf.unstack(dtypes)
              ]
              entries = [
                  tf.TensorSpec(shape, dtype, column)
                  for (shape, dtype, column) in zip(
                      shapes, dtypes, columns
                  )
              ]
          else:
              assert spec is not None
  
              entries = spec.items()
  
              def f(column, columns, shapes):
                  shape = tf.boolean_mask(
                      shapes, tf.math.equal(columns, column)
                  )[0]
                  shape = tf.boolean_mask(
                      shape, tf.math.greater_equal(shape, 0)
                  )
                  return shape
  
              shapes = [
                  f(column, columns, shapes) for column, _ in entries
              ]
              dtypes = [
                  entry
                  if isinstance(entry, tf.dtypes.DType)
                  else entry.dtype
                  for _, entry in entries
              ]
              columns = [column for column, _ in entries]
  
              entries = [
                  tf.TensorSpec(None, dtype, column)
                  for (dtype, column) in zip(dtypes, columns)
              ]
  
          def g(entry, shape):
              return BaseHDF5GraphIOTensor(
                  filename,
                  entry.name,
                  shape,
                  entry.dtype,
                  internal=True,
              )
  
          elements = [
              g(entry, shape) for (entry, shape) in zip(entries, shapes)
          ]
          spec = tuple(entries)
          super().__init__(spec, columns, elements, internal=internal)
  
file_path: io/tensorflow_io/python/ops/hdf5_io_tensor_ops.py
imports: import tensorflow
  from tensorflow_io.python.ops import core_ops
  from tensorflow_io.python.ops import io_tensor_ops
label_desc: Use image node_id 1 to create a new HDF5IOTensor object from inherited base classes: io_tensor_ops with example: obj = HDF5IOTensor(filename, spec, internal)