<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main( source, repo_source_files, requirements_file, local_source_file, work_dir):
 """ Bundle up a deployment package for AWS Lambda. From your local filesystem: \b $ make-lambda-package . dist/lambda-package.zip Or from a remote git repository: \b $ make-lambda-package https://github.com/NoRedInk/make-lambda-package.git vendor/dist/NoRedInk-make-lambda-package.zip Use # fragment to specify a commit or a branch: \b $ make-lambda-package https://github.com/NoRedInk/make-lambda-package.git#v1.0.0 Dependencies specified with --requirements-file will built using a docker container that replicates AWS Lambda's execution environment, so that extension modules are correctly packaged. When packaging a local source, --work-dir defaults to `.`: \b * ./build will hold a virtualenv for building dependencies if specified. * ./dist is where the zipped package will be saved When packaging a remote source, --work-dir defaults to `./vendor`. """

    scm_source = fsutil.parse_path_or_url(source)
    paths = fsutil.decide_paths(scm_source, work_dir)

    if requirements_file:
        with open(os.devnull, 'w') as devnull:
            docker_retcode = subprocess.call(['docker', '--help'], stdout=devnull)
        if docker_retcode != 0:
            raise click.UsageError(
                "`docker` command doesn't seem to be available. "
                "It's required to package dependencies.")

    if not (requirements_file or repo_source_files or local_source_file):
        click.secho(
            'Warning: without --repo-source-files, --requirements-file, '
            'or --local-source-file, nothing will be included in the zip file. '
            'Assuming you have good reasons to do this and proceeding.',
            fg='yellow')

    fsutil.ensure_dirs(paths)

    if isinstance(scm_source, fsutil.RemoteSource):
        click.echo('Fetching repo..')
        scm.fetch_repo(scm_source.url, scm_source.ref, paths.src_dir)

    deps_file = None
    if requirements_file:
        click.echo('Building deps..')
        deps_file = deps.build_deps(paths, requirements_file)

    click.echo('Creating zip file..')
    archive.make_archive(
        paths,
        repo_source_files,
        local_source_file,
        deps_file)

    click.echo(os.path.relpath(paths.zip_path, os.getcwd()))