class_docstr: Graph Transformer.
  
  This is the bulk of the AutoDist backend logic, taking a single-node,
  single-GPU graph and transforming it into a distributed
  graph. This all happens based on the `Strategy` provided.
  
  The transformation occurs over several steps:
  
  1. Partitions the necessary variables
  2. Replicates the graph the desired number of times
  3. Within the graph, synchronizes gradients with in-graph logic
  4. Adds between-graph gradient synchronization logic
docstr: Return the number of local replicas.
docstr_tok: ["Return","the","number","of","local","replicas","."]
code: def num_local_replicas(self):
      """Return the number of local replicas."""
      assert self._num_local_replicas != 0  # ensure initialized
      return self._num_local_replicas
  
file_path: autodist/autodist/kernel/graph_transformer.py
imports: from tensorflow.core.framework.attr_value_pb2 import AttrValue
  from tensorflow.python.eager import context
  from tensorflow.python.framework import device_spec
  from autodist.graph_item import GraphItem
  from autodist.kernel.partitioner import VariablePartitioner
  from autodist.kernel.replicator import Replicator
  from autodist.kernel.synchronization.synchronizer import Synchronizer
  from autodist.utils import logging, visualization_util
label_desc: Use image node_id 4 for calling the GraphTransformer obj's underlying member method code with example usage: obj.num_local_replicas() and returns: self