human
brick 1102p240" is in the survey-bricks.fits.gz table. 
Legacypipe interpolates 0.25x0.25 deg2 to a 3600x3600 pixel grid
"zoom 500 600 ..." analyses only that slice of the full 3600x3600 region
"force-all, no-write, no-wise" run everything, dont be verbose, skip WISE forced photometry
"survey-dir, outdir" legacy_survey_dir and where to write all legacypipe/tractor outputs

The main() above does the following:
* call the run_brick() function in legacypipe/py/legacypipe/runbrick.py
* which runs the 6 "stages" of the legacypipe/Tractor pipeline
 1. stage_tims: read in all fits tables, images, and calibration data from legacy_survey_dir, save as Tractor Image Objects (tims)                                                      
 2. stage_image_coadds                                                    
 2. stage_srcs: detect sources at SN >= 6 using five matched filters                                                           
 4. stage_fitblobs: finds the best fitting point-source or galaxy model for each source. Each detection is pixel dilated to a group of contiguous pixels called a "blob", blobs are processed in parallel, each blob can have many sources                                                        
 5. stage_coadds: make coadded image, invvar, model, chi2, and depth images                                                         
 6. stage_wise_forced: use best fit models to do forced photometry on WISE imaging
 7. stage_writecat: write Tractor catalogues
REMEMBER: create the calibration files BEFORE running legacypipe
Code you'll need to write

decam.py"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to brick 1102p240" is in the survey-bricks.

# https://github.com/legacysurvey/legacypipe/blob/master/py/legacypipe/decam.py
# Edited to be barebones
from __future__ import print_function
import os
import numpy as np
import fitsio
from legacypipe.image import CalibMixin
from legacypipe.cpimage import CPImage
from legacypipe.survey import LegacySurveyData

'''
Code specific to images from the Dark Energy Camera (DECam).
'''

class DecamImage(CPImage, CalibMixin):
    '''
    A LegacySurveyImage subclass to handle images from the Dark Energy
    Camera, DECam, on the Blanco telescope.
    '''
    # background subtraction fitting spline to every 512 pixels, interpolating between
    splinesky_boxsize = 512

    def __init__(self, survey, t):
        super(DecamImage, self).__init__(survey, t)
        # Check that these are set properly
        #self.imgfn # image relative path starting from legacy_survey_dir/images/
        #self.dqfn # bad pixel image
        #self.wtfn # invvar image
        
        # zeropoint units in ADU/sec
        self.ccdzpt += 2.5 * np.log10(self.exptime)
        
    def __str__(self):
        return 'DECam ' + self.name

    @classmethod
    def nominal_zeropoints(self):
        # Units ADU/sec for a good night 2 years ago
        return dict(g = 25.08,
                    r = 25.29,
                    z = 24.92,)
    
    @classmethod
    def photometric_ccds(self, survey, ccds):
        """Remove exposures from survey-ccds-1.fits.gz if image quality not 
        good enough
        
        Args:
          ccds: the survey-ccds-1.fits.gz table
        """
        # Nominal zeropoints (DECam)
        z0 = self.nominal_zeropoints()
        z0 = np.array([z0[f[0]] for f in ccds.filter])
        # You can skipping removing any of them with:
        good = np.ones(len(ccds), bool)
        return np.flatnonzero(good)

    @classmethod
    def ccd_cuts(self, survey, ccds):
        return np.zeros(len(ccds), np.int32)

    def get_good_image_subregion(self):
        """Optional"""
        x0,x1,y0,y1 = None,None,None,None
        #...