code: def create_input_set_from_tokens_and_segments(
      unpadded_tokens: List[str],
      unpadded_segment_ids: List[int],
      tokenizer,
      feat_spec: FeaturizationSpec,
  ):
      """Create padded inputs for model.
  
      Converts tokens to ids, makes input set (input ids, input mask, and segment ids), adds padding.
  
      Args:
          unpadded_tokens (List[str]): unpadded list of token strings.
          unpadded_segment_ids (List[int]): unpadded list of segment ids.
          tokenizer:
          feat_spec (FeaturizationSpec): Tokenization-related metadata.
  
      Returns:
          Padded input set.
  
      """
      assert len(unpadded_tokens) == len(unpadded_segment_ids)
      input_ids = tokenizer.convert_tokens_to_ids(unpadded_tokens)
      input_mask = [1] * len(input_ids)
      input_set = pad_features_with_feat_spec(
          input_ids=input_ids,
          input_mask=input_mask,
          unpadded_segment_ids=unpadded_segment_ids,
          feat_spec=feat_spec,
      )
      return input_set
  
imports: import numpy
  from dataclasses import dataclass
  from typing import List, NamedTuple
  from jiant.tasks.core import FeaturizationSpec
  from jiant.tasks.utils import truncate_sequences, pad_to_max_seq_length
  from jiant.utils.python.datastructures import BiMap
label_desc: Use image node_id 7 for calling a global function with example usage: create_input_set_from_tokens_and_segments(unpadded_tokens, unpadded_segment_ids, tokenizer, feat_spec) and returns: input_set