class_docstr: This enables some customizable hooks to enable composability with tensor
  parallelism. To activate these hooks, use :func:`_set_fsdp_extensions` to
  set a custom :class:`FSDPExtensions` that implements the hooks.
docstr: Shards a tensor/DTensor to DTensor and returns the local DTensor.
docstr_tok: ["Shards","a","tensor\/DTensor","to","DTensor","and","returns","the","local","DTensor","."]
code: def chunk_dtensor(
      self,
      tensor: torch.Tensor,
      rank: int,
      device_mesh: DeviceMesh,
  ) -> torch.Tensor:
      """Shards a tensor/DTensor to DTensor and returns the local DTensor."""
      ...
  
imports: from abc import ABC, abstractmethod
  from typing import Any, List, Optional, Tuple
  import torch
  import torch.distributed
  from torch.distributed._shard.sharded_tensor.api import ShardedTensor
  from torch.distributed._shard.sharded_tensor.shard import Shard
  from torch.distributed._tensor import DeviceMesh, DTensor
  from torch.distributed.fsdp._shard_utils import _all_gather_dtensor, _create_chunk_dtensor, _create_chunk_sharded_tensor
label_desc: Use image node_id 4 for calling the FSDPExtensions obj's underlying member method code with example usage: obj.chunk_dtensor(tensor, rank, device_mesh) without return types