code: def get_arm_indices(
      ids_of_all_arms: List[str], ids_of_arms_in_batch: List[str]
  ) -> List[int]:
      arm_idxs = []
      for i in ids_of_arms_in_batch:
          try:
              arm_idxs.append(ids_of_all_arms.index(i))
          except ValueError:
              raise ValueError(
                  f"Unknown arm_id {i}. Known arm ids: {ids_of_all_arms}"
              )
      return arm_idxs
  
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: get_arm_indices(ids_of_all_arms, ids_of_arms_in_batch) and returns: arm_idxs