code: def add_special_token_2d(
      values: List[List[int]],
      special_token: int = 0,
      use_first_value: bool = False,
  ) -> List[List[int]]:
      results = torch.jit.annotate(List[List[int]], [])
      for value in values:
          result = torch.jit.annotate(List[int], [])
          if use_first_value and len(value) > 0:
              special_token = value[0]
          result.append(special_token)
          result.extend(value)
          result.append(special_token)
          results.append(result)
      return results
  
imports: from typing import List, NamedTuple, Optional, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 13 for calling a global function with example usage: add_special_token_2d(values, special_token, use_first_value) and returns: results