code: def _extend_tuple_type(cls, value):
      sub_cls_list = list(cls.__args__)
      if len(sub_cls_list) != len(value):
          if len(sub_cls_list) != 2 or sub_cls_list[1] is not Ellipsis:
              raise ValueError(
                  f"{len(value)} values found which is more than number of types in tuple {cls}"
              )
          del sub_cls_list[1]
          sub_cls_list.extend(
              (cls.__args__[0],) * (len(value) - len(sub_cls_list))
          )
      return sub_cls_list
  
imports: from enum import Enum
  from typing import Dict, List, Tuple, Union
label_desc: Use image node_id 3 for calling a global function with example usage: _extend_tuple_type(cls, value) and returns: sub_cls_list