class_docstr: Represents the layout information of a DTensor.
  
  A layout describes how a distributed tensor is partitioned across a mesh (and
  thus across devices). For each axis of the tensor, the corresponding
  sharding spec indicates which dimension of the mesh it is sharded over. A
  special sharding spec `UNSHARDED` indicates that axis is replicated on
  all the devices of that mesh.
  
  Refer to [DTensor Concepts](https://www.tensorflow.org/guide/dtensor_overview)
  for in depth discussion and examples.
  
  For example, let's consider a 1-D mesh:
  
  ```
  Mesh(["TPU:0", "TPU:1", "TPU:2", "TPU:3", "TPU:4", "TPU:5"], [("x", 6)])
  ```
  
  This mesh arranges 6 TPU devices into a 1-D array. `Layout([UNSHARDED], mesh)`
  is a layout for rank-1 tensor which is replicated on the 6 devices.
  
  For another example, let's consider a 2-D mesh:
  
  ```
  Mesh(["TPU:0", "TPU:1", "TPU:2", "TPU:3", "TPU:4", "TPU:5"],
       [("x", 3), ("y", 2)])
  ```
  
  This mesh arranges 6 TPU devices into a `3x2` 2-D array.
  `Layout(["x", UNSHARDED], mesh)` is a layout for rank-2 tensor whose first
  axis is sharded on mesh dimension "x" and the second axis is replicated. If we
  place `np.arange(6).reshape((3, 2))` using this layout, the individual
  components tensors would look like:
  
  ```
  Device  |  Component
   TPU:0     [[0, 1]]
   TPU:1     [[0, 1]]
   TPU:2     [[2, 3]]
   TPU:3     [[2, 3]]
   TPU:4     [[4, 5]]
   TPU:5     [[4, 5]]
  ```
class_docstr_tok: ["Represents","the","layout","information","of","a","DTensor",".","A","layout","describes","how","a","distributed","tensor","is","partitioned","across","a","mesh","(","and","thus","across","devices",")",".","For","each","axis","of","the","tensor",",","the","corresponding","sharding","spec","indicates","which","dimension","of","the","mesh","it","is","sharded","over",".","A","special","sharding","spec","`","UNSHARDED","`","indicates","that","axis","is","replicated","on","all","the","devices","of","that","mesh",".","Refer","to","[","DTensor","Concepts","]","(","https",":","\/\/www.tensorflow.org\/guide\/dtensor_overview",")","for","in","depth","discussion","and","examples",".","For","example",",","let","'s","consider","a","1-D","mesh",":","``","`","Mesh","(","[","``","TPU:0","''",",","``","TPU:1","''",",","``","TPU:2","''",",","``","TPU:3","''",",","``","TPU:4","''",",","``","TPU:5","''","]",",","[","(","``","x","''",",","6",")","]",")","``","`","This","mesh","arranges","6","TPU","devices","into","a","1-D","array",".","`","Layout","(","[","UNSHARDED","]",",","mesh",")","`","is","a","layout","for","rank-1","tensor","which","is","replicated","on","the","6","devices",".","For","another","example",",","let","'s","consider","a","2-D","mesh",":","``","`","Mesh","(","[","``","TPU:0","''",",","``","TPU:1","''",",","``","TPU:2","''",",","``","TPU:3","''",",","``","TPU:4","''",",","``","TPU:5","''","]",",","[","(","``","x","''",",","3",")",",","(","``","y","''",",","2",")","]",")","``","`","This","mesh","arranges","6","TPU","devices","into","a","`","3x2","`","2-D","array",".","`","Layout","(","[","``","x","''",",","UNSHARDED","]",",","mesh",")","`","is","a","layout","for","rank-2","tensor","whose","first","axis","is","sharded","on","mesh","dimension","``","x","''","and","the","second","axis","is","replicated",".","If","we","place","`","np.arange","(","6",")",".reshape","(","(","3",",","2",")",")","`","using","this","layout",",","the","individual","components","tensors","would","look","like",":","``","`","Device","|","Component","TPU:0","[","[","0",",","1","]","]","TPU:1","[","[","0",",","1","]","]","TPU:2","[","[","2",",","3","]","]","TPU:3","[","[","2",",","3","]","]","TPU:4","[","[","4",",","5","]","]","TPU:5","[","[","4",",","5","]","]","``","`"]
docstr: Returns a "parted" layout from a static layout.
  
  A parted layout contains axes that are treated as independent by most of
  SPMD expanders.
  
  FIXME(b/285905569): The exact semantics is still being investigated.
docstr_tok: ["Returns","a","``","parted","''","layout","from","a","static","layout",".","A","parted","layout","contains","axes","that","are","treated","as","independent","by","most","of","SPMD","expanders",".","FIXME","(","b\/285905569",")",":","The","exact","semantics","is","still","being","investigated","."]
code: def to_parted(self) -> "Layout":
      """Returns a "parted" layout from a static layout.
  
      A parted layout contains axes that are treated as independent by most of
      SPMD expanders.
  
      FIXME(b/285905569): The exact semantics is still being investigated.
      """
      return Layout._new_object(layout=super().to_parted())
  
imports: import collections
  import functools
  import itertools
  from typing import List, Dict, Optional, Union
  import numpy
  from tensorflow.dtensor.proto import layout_pb2
  from tensorflow.python import _pywrap_dtensor_device
  from tensorflow.python.framework import device
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 12 for calling the Layout obj's underlying member method code with example usage: obj.to_parted() and returns: Layout