class_docstr: Helper class to conveniently convert between partition list and partition string.
class_docstr_tok: ["Helper","class","to","conveniently","convert","between","partition","list","and","partition","string","."]
docstr: The number of total partitions.
  
  Returns:
      int
code: def num_shards(self):
      """
      The number of total partitions.
  
      Returns:
          int
      """
      shard = 1
      for i in self.partition_list:
          shard = shard * i
      return shard
  
imports: import collections
  import re
  from google.protobuf.pyext._message import RepeatedScalarContainer
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python import ops
  from tensorflow.python.framework import dtypes, versions
  from tensorflow.python.ops import embedding_ops
  from tensorflow.python.ops import variable_scope, array_ops, math_ops
  from tensorflow.python.ops.variables import Variable, PartitionedVariable
  from tensorflow.python.util.compat import as_bytes
  from autodist.const import AUTODIST_TO_DELETE_SCOPE, COLOCATION_PREFIX
  from autodist.checkpoint.saver import Saver
  from autodist.graph_item import GraphItem, Info
  from autodist.kernel.common.op_info import MUTABLE_STATE_OP_DIRECT_CONSUMER_OPS
  from autodist.kernel.common.utils import get_op_name, get_consumers, update_consumers, parse_name_scope
  from autodist.kernel.common.variable_utils import is_read_var_op
  from autodist.kernel.kernel import Kernel
  from autodist.utils import logging
label_desc: Use image node_id 7 for calling the PartitionerConfig obj's underlying member method code with example usage: obj.num_shards() and returns: shard