class_docstr: *GTZAN* :cite:`tzanetakis_essl_cook_2001` dataset.
  
  Note:
      Please see http://marsyas.info/downloads/datasets.html if you are planning to use
      this dataset to publish results.
  
  Note:
      As of October 2022, the download link is not currently working. Setting ``download=True``
      in GTZAN dataset will result in a URL connection error.
  
  Args:
      root (str or Path): Path to the directory where the dataset is found or downloaded.
      url (str, optional): The URL to download the dataset from.
          (default: ``"http://opihi.cs.uvic.ca/sound/genres.tar.gz"``)
      folder_in_archive (str, optional): The top-level directory of the dataset.
      download (bool, optional):
          Whether to download the dataset if it is not found at root path. (default: ``False``).
      subset (str or None, optional): Which subset of the dataset to use.
          One of ``"training"``, ``"validation"``, ``"testing"`` or ``None``.
          If ``None``, the entire dataset is used. (default: ``None``).
docstr: Load the n-th sample from the dataset.
  
  Args:
      n (int): The index of the sample to be loaded
  
  Returns:
      Tuple of the following items;
  
      Tensor:
          Waveform
      int:
          Sample rate
      str:
          Label
docstr_tok: ["Load","the","n-th","sample","from","the","dataset",".","Args",":","n","(","int",")",":","The","index","of","the","sample","to","be","loaded","Returns",":","Tuple","of","the","following","items",";","Tensor",":","Waveform","int",":","Sample","rate","str",":","Label"]
code: def __getitem__(self, n: int) -> Tuple[Tensor, int, str]:
      """Load the n-th sample from the dataset.
  
      Args:
          n (int): The index of the sample to be loaded
  
      Returns:
          Tuple of the following items;
  
          Tensor:
              Waveform
          int:
              Sample rate
          str:
              Label
      """
      fileid = self._walker[n]
      item = load_gtzan_item(fileid, self._path, self._ext_audio)
      waveform, sample_rate, label = item
      return waveform, sample_rate, label
  
file_path: audio/src/torchaudio/datasets/gtzan.py
imports: import os
  from pathlib import Path
  from typing import Optional, Tuple, Union
  import torchaudio
  from torch import Tensor
  from torch.utils.data import Dataset
  from torchaudio._internal import download_url_to_file
  from torchaudio.datasets.utils import _extract_tar
label_desc: Use image node_id 2 for calling the GTZAN obj's underlying member method code with example usage: obj.__getitem__(n) and returns: waveform,  sample_rate,  label