code: def fetch_LINEAR_sample(data_home=None, download_if_missing=True):
      """Loader for LINEAR data sample
  
      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 : LINEARdata object
          A custom object which provides access to 7010 selected LINEAR light
          curves.
      """
      data_home = get_data_home(data_home)
  
      targetlist_file = os.path.join(
          data_home, os.path.basename(TARGETLIST_URL)
      )
      data_file = os.path.join(data_home, os.path.basename(DATA_URL))
  
      if not os.path.exists(targetlist_file):
          if not download_if_missing:
              raise IOError(
                  "data not present on disk. "
                  "set download_if_missing=True to download"
              )
  
          targets = download_with_progress_bar(TARGETLIST_URL)
          open(targetlist_file, "wb").write(targets)
  
      if not os.path.exists(data_file):
          if not download_if_missing:
              raise IOError(
                  "data not present on disk. "
                  "set download_if_missing=True to download"
              )
  
          databuffer = download_with_progress_bar(DATA_URL)
          open(data_file, "wb").write(databuffer)
  
      return LINEARdata(data_file, targetlist_file)
  
file_path: astroML/astroML/datasets/LINEAR_sample.py
imports: import os
  import tarfile
  import numpy
  from astropy.table import Table
  from .None import get_data_home
  from .tools import download_with_progress_bar
label_desc: Use image node_id 1 for calling a global function with example usage: fetch_LINEAR_sample(data_home, download_if_missing) and returns: LINEARdata