class_docstr: TextSet wraps a set of texts with status.
class_docstr_tok: ["TextSet","wraps","a","set","of","texts","with","status","."]
docstr: Convert to a DistributedTextSet.
  
  Need to specify SparkContext to convert a LocalTextSet to a DistributedTextSet.
  In this case, you may also want to specify partition_num, the default of which is 4.
  
  :return: DistributedTextSet
docstr_tok: ["Convert","to","a","DistributedTextSet",".","Need","to","specify","SparkContext","to","convert","a","LocalTextSet","to","a","DistributedTextSet",".","In","this","case",",","you","may","also","want","to","specify","partition_num",",","the","default","of","which","is","4.",":","return",":","DistributedTextSet"]
code: def to_distributed(self, sc=None, partition_num=4):
      """
      Convert to a DistributedTextSet.
  
      Need to specify SparkContext to convert a LocalTextSet to a DistributedTextSet.
      In this case, you may also want to specify partition_num, the default of which is 4.
  
      :return: DistributedTextSet
      """
      if self.is_distributed():
          jvalue = self.value
      else:
          assert (
              sc
          ), "sc cannot be null to transform a LocalTextSet to a DistributedTextSet"
          jvalue = callZooFunc(
              self.bigdl_type,
              "textSetToDistributed",
              self.value,
              sc,
              partition_num,
          )
      return DistributedTextSet(jvalue=jvalue)
  
imports: import six
  from bigdl.util.common import JavaValue
  from zoo.common.utils import callZooFunc
  from pyspark import RDD
label_desc: Use image node_id 4 for calling the TextSet obj's underlying member method code with example usage: obj.to_distributed(sc, partition_num) and returns: DistributedTextSet