code: def token_time_to_note(number, cutoff_time_idx, current_idx):
      current_idx += number
      if cutoff_time_idx is not None:
          current_idx = min(current_idx, cutoff_time_idx)
  
      return current_idx
  
imports: import json
  import os
  from typing import List, Optional, Tuple, Union
  import numpy
  from ...feature_extraction_utils import BatchFeature
  from ...tokenization_utils import AddedToken, BatchEncoding, PaddingStrategy, PreTrainedTokenizer, TruncationStrategy
  from ...utils import TensorType, is_pretty_midi_available, logging, requires_backends, to_numpy
label_desc: Use image node_id 1 for calling a global function with example usage: token_time_to_note(number, cutoff_time_idx, current_idx) and returns: current_idx