code: def fetch_dr7_quasar(data_home=None, download_if_missing=True):
      """Loader for SDSS DR7 quasar catalog
  
      Parameters
      ----------
      data_home : optional, default=None
          Specify another download and cache folder for the datasets. By default
          all astroML data is stored in '~/astroML_data'.
  
      download_if_missing : optional, default=True
          If False, raise a IOError if the data is not locally available
          instead of trying to download the data from the source site.
  
      Returns
      -------
      data : ndarray, shape = (105783,)
          numpy record array containing the quasar catalog
  
      Examples
      --------
      >>> from astroML.datasets import fetch_dr7_quasar
      >>> data = fetch_dr7_quasar()  # doctest: +IGNORE_OUTPUT +REMOTE_DATA
      >>> u_g = data['mag_u'] - data['mag_g']  # doctest: +REMOTE_DATA
      >>> u_g[:3]  # first three u-g colors  # doctest: +REMOTE_DATA
      array([-0.07699966,  0.03600121,  0.10900116], dtype=float32)
  
      Notes
      -----
      Not all available data is extracted and saved.  The extracted columns are:
  
      sdssID, RA, DEC, redshift, mag_u, err_u, mag_g, err_g, mag_r, err_r,
      mag_i, err_i, mag_z, err_z, mag_J, err_J, mag_H, err_H, mag_K, err_K,
      specobjid
  
      many of the objects are missing 2mass photometry.
  
      More information at
      http://www.sdss.org/dr7/products/value_added/qsocat_dr7.html
      """
      data_home = get_data_home(data_home)
  
      archive_file = os.path.join(data_home, ARCHIVE_FILE)
  
      if not os.path.exists(archive_file):
          if not download_if_missing:
              raise IOError(
                  "data not present on disk. "
                  "set download_if_missing=True to download"
              )
  
          print(
              "downloading DR7 quasar dataset from %s to %s"
              % (DATA_URL, data_home)
          )
  
          zipped_buf = download_with_progress_bar(
              DATA_URL, return_buffer=True
          )
          gzf = GzipFile(fileobj=zipped_buf, mode="rb")
          extracted_buf = BytesIO(gzf.read())
          data = np.loadtxt(
              extracted_buf,
              skiprows=SKIP_ROWS,
              usecols=COLUMN_NUMBERS,
              dtype=DR7_DTYPE,
          )
          np.save(archive_file, data)
  
      else:
          data = np.load(archive_file)
  
      return data
  
imports: import os
  from gzip import GzipFile
  from io import BytesIO
  import numpy
  from .tools import download_with_progress_bar
  from .None import get_data_home
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_dr7_quasar(data_home, download_if_missing) and returns: data