def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('-i', '--input', required=True)
    parser.add_argument('-o', '--output', default=False)
    parser.add_argument('-n', '--output_file_name', default='out.txt')
    parser.add_argument('-f', '--fail_if_empty', action='store_true',
                        default=False)
    parser.add_argument('paths',
                        nargs='*',
                        help='Instead of profiling, you '+ \
                             'can check whether paths exist.')
    args = parser.parse_args()
    input_dir = getenv(args.input) if getenv(args.input) else args.input

    if len(args.paths) > 0:
        # check whether the paths exist
        paths_exist(input_dir, args.paths)
    else:
        # profile the directory
        assert args.output, "Output directory was not provided."
        output_dir = getenv(args.output) if getenv(args.output) else args.output
        profile_input(input_dir, output_dir, args.output_file_name,
                      args.fail_if_empty)
Main Function
dataset/ETHPy150Open coursera/dataduct/examples/resources/scripts/s3_profiler.py/main