<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sky(input=None,outExt=None,configObj=None, group=None, editpars=False, **inputDict):
 """ Perform sky subtraction on input list of images Parameters input : str or list of str a python list of image filenames, or just a single filename configObj : configObject an instance of configObject inputDict : dict, optional an optional list of parameters specified by the user outExt : str The extension of the output image. If the output already exists then the input image is overwritten Notes ----- These are parameters that the configObj should contain by default, they can be altered on the fly using the inputDict Parameters that should be in configobj: ========== =================================================================== Name Definition ========== =================================================================== skymethod 'Sky computation method' skysub		'Perform sky subtraction?' skywidth	'Bin width of histogram for sampling sky statistics (in sigma)' skystat	 	'Sky correction statistics parameter' skylower	'Lower limit of usable data for sky (always in electrons)' skyupper	'Upper limit of usable data for sky (always in electrons)' skyclip		'Number of clipping iterations' skylsigma	'Lower side clipping factor (in sigma)' skyusigma	'Upper side clipping factor (in sigma)' skymask_cat 'Catalog file listing image masks' use_static 'Use static mask for skymatch computations?' sky_bits 'Integer mask bit values considered good pixels in DQ array' skyfile 'Name of file with user-computed sky values' skyuser 'KEYWORD indicating a sky subtraction value if done by user' in_memory 'Optimize for speed or for memory use' ========== =================================================================== The output from sky subtraction is a copy of the original input file where all the science data extensions have been sky subtracted. """



    if input is not None:
        inputDict['input']=input
        inputDict['output']=None
        inputDict['updatewcs']=False
        inputDict['group']=group
    else:
        print("Please supply an input image", file=sys.stderr)
        raise ValueError

    configObj = util.getDefaultConfigObj(__taskname__,configObj,inputDict,loadOnly=(not editpars))
    if configObj is None:
        return

    if not editpars:
        run(configObj,outExt=outExt)