code: def get_partition_adapter(
      dataset_loader,
      model,
      strategy="Bucket",
      partitioning_k=3,
      root_directory=None,
  ):
      """Returns partition manager depending on the one registered by the partitioning strategy.
  
      Parameters
      ----------
      dataset_loader: AbstractGraphPartitioner or GraphDataLoader
          Parent dataset loader that will be used for partitioning.
      model: tf.keras.Model
          KGE model that will be managed while using partitioning.
      strategy: str
          Graph partitioning strategy.
      """
      if isinstance(dataset_loader, AbstractGraphPartitioner):
          partitioner_manager = PARTITION_MANAGER_REGISTRY.get(
              dataset_loader.manager
          )(
              dataset_loader,
              model,
              dataset_loader.name,
              dataset_loader._k,
              root_directory,
          )
  
      else:
          partitioner = PARTITION_ALGO_REGISTRY.get(strategy)(
              dataset_loader, k=partitioning_k
          )
          partitioner_manager = PARTITION_MANAGER_REGISTRY.get(
              partitioner.manager
          )(
              partitioner,
              model,
              strategy,
              partitioning_k,
              root_directory,
          )
  
      return partitioner_manager
  
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 2 for calling a global function with example usage: get_partition_adapter(dataset_loader, model, strategy, partitioning_k, root_directory) and returns: partitioner_manager