code: def get_position_ids(batch_size, seq_length, device):
      position_ids = (
          torch.arange(seq_length, dtype=torch.long, device=device)
          .unsqueeze(0)
          .repeat(batch_size, 1)
      )
      return position_ids
  
file_path: colossalai/colossalai/inference/engine/modeling/chatglm2.py
imports: from typing import List, Optional, Tuple
  import torch
  from transformers.utils import logging
  from colossalai.inference.kv_cache import BatchInferState
  from colossalai.kernel.triton.token_attention_kernel import Llama2TokenAttentionForwards
  from colossalai.pipeline.stage_manager import PipelineStageManager
  from colossalai.shardformer import ShardConfig
  from colossalai.shardformer.modeling.chatglm2_6b.modeling_chatglm import ChatGLMForConditionalGeneration, ChatGLMModel, GLMBlock, GLMTransformer, SelfAttention, split_tensor_along_last_dim
  from ._utils import copy_kv_to_mem_cache
label_desc: Use image node_id 2 for calling a global function with example usage: get_position_ids(batch_size, seq_length, device) and returns: position_ids