class_docstr: Class providing an artificial backend, that reads data into memory.
class_docstr_tok: ["Class","providing","an","artificial","backend",",","that","reads","data","into","memory","."]
docstr: Data batch generator.
  
  Parameters
  ----------
  batch_size: int
       Size of a batch.
  dataset_type: str
       Kind of dataset that is needed (`"train"` | `"test"` | `"validation"`).
  random: not implemented.
  index_by: not implemented.
  
  Returns
  --------
  Batch : ndarray
       Batch of data of size `(batch_size, m)` where :math:`m≥3` and :math:`m>3` if numeric values
       associated to edges are available.
docstr_tok: ["Data","batch","generator",".","Parameters","--","--","--","--","--","batch_size",":","int","Size","of","a","batch",".","dataset_type",":","str","Kind","of","dataset","that","is","needed","(","`","``","train","''","`","|","`","``","test","''","`","|","`","``","validation","''","`",")",".","random",":","not","implemented",".","index_by",":","not","implemented",".","Returns","--","--","--","--","Batch",":","ndarray","Batch","of","data","of","size","`","(","batch_size",",","m",")","`","where",":","math",":","`","m\u22653","`","and",":","math",":","`","m",">","3","`","if","numeric","values","associated","to","edges","are","available","."]
code: def _get_batch_generator(
      self, batch_size, dataset_type="train", random=False, index_by=""
  ):
      """Data batch generator.
  
      Parameters
      ----------
      batch_size: int
           Size of a batch.
      dataset_type: str
           Kind of dataset that is needed (`"train"` | `"test"` | `"validation"`).
      random: not implemented.
      index_by: not implemented.
  
      Returns
      --------
      Batch : ndarray
           Batch of data of size `(batch_size, m)` where :math:`m≥3` and :math:`m>3` if numeric values
           associated to edges are available.
      """
      if not isinstance(batch_size, int):
          batch_size = int(batch_size)
      length = len(self.data)
      triples = range(0, length, batch_size)
      for start_index in triples:
          # if the last batch is smaller than the batch_size
          if start_index + batch_size >= length:
              batch_size = length - start_index
          out = self.data[start_index : start_index + batch_size, :3]
          if self.use_filter:
              # get the filter values
              participating_entities = self._get_complementary_entities(
                  out, self.use_filter
              )
  
          # focusE
          if self.data_shape > 3:
              weights = self.data[
                  start_index : start_index + batch_size, 3:
              ]
              # weights = preprocess_focusE_weights(data=out,
              #                                     weights=weights)
              if self.use_filter:
                  yield out, tf.ragged.constant(
                      participating_entities, dtype=tf.int32
                  ), weights
              else:
                  yield out, weights
  
          else:
              if self.use_filter:
                  yield out, tf.ragged.constant(
                      participating_entities, dtype=tf.int32
                  )
              else:
                  yield out
  
imports: import logging
  import tempfile
  import uuid
  from datetime import datetime
  import numpy
  import pandas
  import tensorflow
  from .data_indexer import DataIndexer
  from .source_identifier import DataSourceIdentifier
label_desc: Use image node_id 14 for calling the NoBackend obj's underlying member method code with example usage: obj._get_batch_generator(batch_size, dataset_type, random, index_by) without return types