class_docstr: Split the vocabulary into `world_size` chunks amd return the
  first and last index of the vocabulary belonging to the `rank`
  partition: Note that indices in [fist, last)
class_docstr_tok: ["Split","the","vocabulary","into","`","world_size","`","chunks","amd","return","the","first","and","last","index","of","the","vocabulary","belonging","to","the","`","rank","`","partition",":","Note","that","indices","in","[","fist",",","last",")"]
code: def vocab_range_from_per_partition_vocab_size(
      per_partition_vocab_size, rank, world_size
  ):
      index_f = rank * per_partition_vocab_size
      index_l = index_f + per_partition_vocab_size
      return index_f, index_l
  
imports: import torch
  import torch.nn.init
  from torch import Tensor
  from torch import nn
  from torch.nn import functional
  from torch.nn.parameter import Parameter
  from colossalai.legacy.context import ParallelMode, seed
  from colossalai.legacy.core import global_context
  from colossalai.legacy.nn.layer.base_layer import ParallelLayer
  from colossalai.legacy.nn.layer.parallel_1d._utils import gather_forward_split_backward, reduce_grad, reduce_input
  from colossalai.legacy.nn.layer.parallel_1d.layers import Linear1D_Row
  from colossalai.legacy.nn.layer.utils import divide
  from colossalai.legacy.registry import LAYERS, LOSSES
  from colossalai.utils import get_current_device
label_desc: Use image node_id 1 for calling the VocabUtility obj's underlying member method code with example usage: obj.vocab_range_from_per_partition_vocab_size(per_partition_vocab_size, rank, world_size) and returns: index_f,  index_l