code: def _calculate_tr(frame_times):
      """Calculate TR from differences in frame_times.
  
      Parameters
      ----------
      frame_times : array of shape (n_scans)
          the desired sampling times
      Returns
      -------
      float
          repetition time
      """
      return np.min(np.diff(frame_times))
  
imports: import warnings
  from collections.abc import Iterable
  import numpy
  from scipy.stats import gamma
  from nilearn._utils import fill_doc
label_desc: Use image node_id 19 for calling a global function with example usage: _calculate_tr(frame_times) and returns: np