code: def infer_repetition_time_from_dataset(bids_path, filters, verbose=0):
      """Return the RepetitionTime metadata field from a BIDS dataset.
  
      Parameters
      ----------
      bids_path : :obj:`str` or :obj:`pathlib.Path`
          Fullpath to the raw folder of the BIDS dataset.
  
      filters : :obj:`list` of :obj:`tuple` (:obj:`str`, :obj:`str`), optional
          Filters are of the form (field, label). Only one filter per field
          allowed. A file that does not match a filter will be discarded.
          Filter examples would be ('ses', '01'), ('dir', 'ap') and
          ('task', 'localizer').
  
      verbose : :obj:`int`, optional
          Indicate the level of verbosity. By default, nothing is printed.
          If 0 prints nothing. If 1 prints warnings.
  
      Returns
      -------
      float or None
          Value of the field or None if the field is not found.
  
      """
      img_specs = get_bids_files(
          main_path=bids_path,
          modality_folder="func",
          file_tag="bold",
          file_type="json",
          filters=filters,
      )
  
      if not img_specs:
          if verbose:
              msg_suffix = f" in {bids_path}"
              warn(f"No bold.json found in BIDS folder{msg_suffix}.")
          return None
  
      return _get_metadata_from_bids(
          field="RepetitionTime",
          json_files=img_specs,
          bids_path=bids_path,
      )
  
file_path: nilearn/nilearn/interfaces/bids/query.py
imports: from __future__ import annotations
  import glob
  import json
  import os
  from pathlib import Path
  from warnings import warn
label_desc: Use image node_id 3 for calling a global function with example usage: infer_repetition_time_from_dataset(bids_path, filters, verbose) and returns: _get_metadata_from_bids, None