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: Deserialize a partition string to a partition list and check if it is valid.
  
  Args:
      partition_str (str): A serialized string format of the partition list.
  
  Returns:
      partition_list (List): A valid partition list.
code: def deserialize(self, partition_str):
      """
      Deserialize a partition string to a partition list and check if it is valid.
  
      Args:
          partition_str (str): A serialized string format of the partition list.
  
      Returns:
          partition_list (List): A valid partition list.
      """
      if len(partition_str) == 0:
          raise ValueError("Empty partition string.")
      partition_list = [
          int(num_split) for num_split in partition_str.split(",")
      ]
      if self._check_partition_list(partition_list):
          return partition_list
      else:
          raise ValueError("Invalid partition list.")
  
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 4 for calling the PartitionerConfig obj's underlying member method code with example usage: obj.deserialize(partition_str) and returns: partition_list