docstr: Generates the data to be trained from the current partition.
  
  Once the partition data is exhausted, the current parameters are persisted; the partition is changed
  and the model is notified.
  
  Returns
  -------
  batch_data_from_current_partition: array of shape (n,3)
      A batch of triples from the current partition being trained.
code: def data_generator(self):
      """Generates the data to be trained from the current partition.
  
      Once the partition data is exhausted, the current parameters are persisted; the partition is changed
      and the model is notified.
  
      Returns
      -------
      batch_data_from_current_partition: array of shape (n,3)
          A batch of triples from the current partition being trained.
      """
      for i, partition_data in enumerate(self.partitioner):
          # partition_data is an object of graph data loader
          # Perform tasks related to change of partition
          self._change_partition(partition_data, i)
          try:
              while True:
                  # generate data from the current partition
                  batch_data_from_current_partition = next(
                      partition_data
                  )
                  yield batch_data_from_current_partition
  
          except StopIteration:
              # No more data in current partition (parsed fully once), so the partition is trained
              # Hence persist the params related to the current partition.
              self._update_partion_embeddings(partition_data, i)
  
imports: import abc
  import glob
  import logging
  import os
  import shelve
  import shutil
  import tempfile
  from datetime import datetime
  import numpy
  import tensorflow
  from .graph_partitioner import PARTITION_ALGO_REGISTRY, AbstractGraphPartitioner
label_desc: Use image node_id 9 for calling the PartitionDataManager obj's underlying member method code with example usage: obj.data_generator() without return types