code: def place_values_at_indices(
      values: Tensor, idxs: List[int], total_len: int
  ) -> Tensor:
      """
      We place the values provided in `values` at indices provided in idxs. The values at indices
          not included in `idxs` are filled with zeros.
      TODO: maybe replace with sparse-to-dense tensor function?
      Example:
          place_values_at_indices(Tensor([4,5]), [2,0], 4) == Tensor([5, 0, 4, 0])
  
      Args:
          values (Tensor): The values
          idxs (List[int]): The indices at which the values have to be placed
          total_len (int): Length of the output tensor
      Return:
          The output tensor
      """
      assert len(values) == len(idxs)
      ret = torch.zeros(total_len)
      ret[idxs] = values
      return ret
  
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: place_values_at_indices(values, idxs, total_len) and returns: ret