code: def surround(idx_vector, start_idx, end_idx):
      """
      Surround the vector by start_idx and end_idx.
      """
      start_tensor = idx_vector.new_tensor([start_idx])
      end_tensor = idx_vector.new_tensor([end_idx])
      return torch.cat([start_tensor, idx_vector, end_tensor], 0)
  
file_path: ParlAI/parlai/agents/bert_ranker/helpers.py
imports: from parlai.core.torch_ranker_agent import TorchRankerAgent
  from parlai.utils.torch import neginf
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: surround(idx_vector, start_idx, end_idx) and returns: torch