docstr: Initializes the Partitioning Data Manager.
  
  Uses/Creates partitioner and generates and manages partition related parameters.
  This is the base class.
  
  Parameters
  ----------
  dataset_loader : AbstractGraphPartitioner or GraphDataLoader
      Either an instance of AbstractGraphPartitioner or GraphDataLoader.
  model : tf.keras.Model
      The model that is being trained.
  strategy : string
      Type of partitioning strategy to use.
  root_directory : str
      directory where the partition manager files will be stored.
code: def __init__(
      self,
      dataset_loader,
      model,
      strategy="Bucket",
      partitioner_k=3,
      root_directory=None,
      ent_map_fname=None,
      ent_meta_fname=None,
      rel_map_fname=None,
      rel_meta_fname=None,
  ):
      """Initializes the Partitioning Data Manager.
  
      Uses/Creates partitioner and generates and manages partition related parameters.
      This is the base class.
  
      Parameters
      ----------
      dataset_loader : AbstractGraphPartitioner or GraphDataLoader
          Either an instance of AbstractGraphPartitioner or GraphDataLoader.
      model : tf.keras.Model
          The model that is being trained.
      strategy : string
          Type of partitioning strategy to use.
      root_directory : str
          directory where the partition manager files will be stored.
      """
      self._model = model
      self.k = self._model.k
      self.internal_k = self._model.internal_k
      self.eta = self._model.eta
      self.partitioner_k = partitioner_k
      if (
          ent_map_fname is not None
          and ent_meta_fname is not None
          and rel_map_fname is not None
          and rel_meta_fname is not None
      ):
          self.root_directory = os.path.dirname(ent_map_fname)
          self.timestamp = os.path.basename(ent_map_fname).split("_")[
              -1
          ][:-4]
          self.ent_map_fname = ent_map_fname
          self.ent_meta_fname = ent_meta_fname
          self.rel_map_fname = rel_map_fname
          self.rel_meta_fname = rel_map_fname
  
      else:
          if root_directory is not None:
              self.root_directory = root_directory
          else:
              self.root_directory = tempfile.gettempdir()
          self.timestamp = datetime.now().strftime(
              "%d-%m-%Y_%I-%M-%S_%f_%p"
          )
          self.ent_map_fname = os.path.join(
              self.root_directory,
              "ent_partition_{}".format(self.timestamp),
          )
          self.ent_meta_fname = os.path.join(
              self.root_directory,
              "ent_metadata_{}".format(self.timestamp),
          )
          self.rel_map_fname = os.path.join(
              self.root_directory,
              "rel_partition_{}".format(self.timestamp),
          )
          self.rel_meta_fname = os.path.join(
              self.root_directory,
              "rel_metadata_{}".format(self.timestamp),
          )
  
      if isinstance(dataset_loader, AbstractGraphPartitioner):
          self.partitioner = dataset_loader
          self.partitioner_k = self.partitioner._k
      else:
          print("Partitioning may take a while...")
          self.partitioner = PARTITION_ALGO_REGISTRY.get(strategy)(
              dataset_loader, k=self.partitioner_k
          )
  
      self.num_ents = (
          self.partitioner._data.backend.mapper.backend.ents_length
      )
      self.num_rels = (
          self.partitioner._data.backend.mapper.backend.rels_length
      )
      self.max_ent_size = 0
      for i in range(len(self.partitioner.partitions)):
          self.max_ent_size = max(
              self.max_ent_size,
              self.partitioner.partitions[
                  i
              ].backend.mapper.backend.ents_length,
          )
  
      self._generate_partition_params()
  
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 1 to create a new PartitionDataManager object from inherited base classes: abc with example: obj = PartitionDataManager(dataset_loader, model, strategy, partitioner_k, root_directory, ent_map_fname, ent_meta_fname, rel_map_fname, rel_meta_fname)