code: def path_to_example(dataset):
      """Construct a file path to an example dataset.
  
      This file defines helper functions to access data files in this directory,
      to support examples. Adapted from the PySAL package.
  
      Parameters
      ----------
      dataset: string
          Name of a dataset to access (e.g., "epsg.json", or "RGB.byte.tif")
  
      Returns
      -------
      A file path (string) to the dataset
  
      Example
      -------
  
          >>> import earthpy.io as eio
          >>> eio.path_to_example('rmnp-dem.tif')
          '...rmnp-dem.tif'
      """
      earthpy_path = os.path.split(earthpy.__file__)[0]
      data_dir = os.path.join(earthpy_path, "example-data")
      data_files = os.listdir(data_dir)
      if dataset not in data_files:
          raise KeyError(
              dataset + " not found in earthpy example data."
          )
      return os.path.join(data_dir, dataset)
  
file_path: earthpy/earthpy/io.py
imports: import io
  import os
  import os.path
  import re
  import requests
  import tarfile
  import zipfile
  import earthpy
label_desc: Use image node_id 1 for calling a global function with example usage: path_to_example(dataset) and returns: os