code: def _get_embed_positions(self, position_ids):
      embed_positions = self.embed_positions
      if embed_positions.device != position_ids.device:
          embed_positions = embed_positions.to(position_ids.device)
          self.embed_positions = embed_positions
      return embed_positions.repeat(position_ids.shape[0], 1, 1)
  
imports: import torch
  from typing import Optional, Tuple, Union
  from bigdl.llm.transformers.models.utils import init_kv_cache, extend_kv_cache, apply_rotary_pos_emb, append_kv_cache
  from transformers.utils.import_utils import is_torch_fx_proxy
label_desc: Use image node_id 1 for calling a global function with example usage: _get_embed_positions(position_ids) and returns: embed_positions