code: def fetch_great_wall(
      data_home=None,
      download_if_missing=True,
      xlim=(-375, -175),
      ylim=(-300, 200),
      cosmo=None,
  ):
      """Get the 2D SDSS "Great Wall" distribution, following Cowan et al 2008
  
      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.
  
      xlim, ylim : tuples or None
          the limits in Mpc of the data: default values are the same as that
          used for the plots in Cowan 2008.  If set to None, no cuts will
          be performed.
  
      cosmo : `astropy.cosmology` instance specifying cosmology
          to use when generating the sample.  If not provided,
          a Flat Lambda CDM model with H0=73.2, Om0=0.27, Tcmb0=0 is used.
  
      Returns
      -------
      data : ndarray, shape = (Ngals, 2)
          grid of projected (x, y) locations of galaxies in Mpc
      """
      # local imports so we don't need dependencies for loading module
      from scipy.interpolate import interp1d
  
      # We need some cosmological information to compute the r-band
      #  absolute magnitudes.
      if cosmo is None:
          cosmo = FlatLambdaCDM(H0=73.2, Om0=0.27, Tcmb0=0)
  
      data = fetch_sdss_specgals(data_home, download_if_missing)
  
      # cut to the part of the sky with the "great wall"
      data = data[(data["dec"] > -7) & (data["dec"] < 7)]
      data = data[(data["ra"] > 80) & (data["ra"] < 280)]
  
      # do a redshift cut, following Cowan et al 2008
      z = data["z"]
      data = data[(z > 0.01) & (z < 0.12)]
  
      # first sample the distance modulus on a grid
      zgrid = np.linspace(min(data["z"]), max(data["z"]), 100)
      mugrid = cosmo.distmod(zgrid).value
      f = interp1d(zgrid, mugrid)
      mu = f(data["z"])
  
      # do an absolute magnitude cut at -20
      Mr = data["petroMag_r"] + data["extinction_r"] - mu
      data = data[Mr < -21]
  
      # compute distances in the equatorial plane
      # first sample comoving distance
      Dcgrid = cosmo.comoving_distance(zgrid).value
      f = interp1d(zgrid, Dcgrid)
      dist = f(data["z"])
  
      locs = np.vstack(
          [
              dist * np.cos(data["ra"] * np.pi / 180.0),
              dist * np.sin(data["ra"] * np.pi / 180.0),
          ]
      ).T
  
      # cut on x and y limits if specified
      if xlim is not None:
          locs = locs[(locs[:, 0] > xlim[0]) & (locs[:, 0] < xlim[1])]
      if ylim is not None:
          locs = locs[(locs[:, 1] > ylim[0]) & (locs[:, 1] < ylim[1])]
  
      return locs
  
imports: import os
  import numpy
  from astropy.cosmology import FlatLambdaCDM
  from astropy.table import Table, vstack
  from .None import get_data_home
label_desc: Use image node_id 2 for calling a global function with example usage: fetch_great_wall(data_home, download_if_missing, xlim, ylim, cosmo) and returns: locs