class_docstr: Partitioned AR StrategyBuilder.
  
  This StrategyBuilder generates a strategy that partitions each variable along its first dimension,
  and synchronizes them using AllReduce. It might be advantageous for communicating extremely large
  messages -- when synchronizing a single message is bounded by single-flow bandwidth.
  
  It will also sequentially merge collective ops into a single collective group based on chunk_size.
  This strategy does not support synchronizing sparse updates with >1 nodes due to the TF AllGather bug.
docstr: Gets the minimum number of shards for a variable.
docstr_tok: ["Gets","the","minimum","number","of","shards","for","a","variable","."]
code: def get_num_shards(var):
      """Gets the minimum number of shards for a variable."""
      if not var.initial_value.shape.ndims:
          return 1
  
      n = int(var.initial_value.shape[0])
      for i in range(2, n):
          if n % i == 0:
              return i
      return n
  
file_path: autodist/autodist/strategy/partitioned_all_reduce_strategy.py
imports: import numpy
  from autodist.kernel.common.utils import get_op_name
  from autodist.kernel.partitioner import PartitionerConfig
  from autodist.proto import strategy_pb2, synchronizers_pb2
  from autodist.strategy.base import Strategy, StrategyBuilder
label_desc: Use image node_id 4 for calling the PartitionedAR obj's underlying member method code with example usage: obj.get_num_shards(var) and returns: n, int, i