def METHOD_NAME():
    parser = argparse.ArgumentParser()
    parser.add_argument('--env', choices=('dev', 'staging', 'prod'), required=True)
    parser.add_argument('--batchsize', default=10, type=float, help='How many jiraHosts to process each iteration')
    parser.add_argument('--input', type=argparse.FileType('r'), required=True)
    parser.add_argument('--output', type=argparse.FileType('a+'), required=True)
    parser.add_argument('--sleep', type=float, help='How long to wait between requests in seconds', required=True)
    parser.add_argument('--level', default='INFO', choices=('INFO', 'ERROR', 'WARNING', 'DEBUG', 'CRITICAL'))
    args = parser.parse_args()
    configure_logging(level=args.level)
    env = create_environment(args.env)
    input_file = args.input
    output_file = args.output
    processed = set()
    output_file.seek(0)
    output_reader = csv.DictReader(output_file, fieldnames=['jiraHost'])
    for row in output_reader:
        processed.add(JiraHost.from_dict(row))
    output_writer = csv.DictWriter(output_file, fieldnames=['jiraHost', 'status'])
    input_reader = csv.DictReader(input_file, fieldnames=['jiraHost'])
    jiraHosts = []
    for row in input_reader:
        jiraHost = JiraHost.from_dict(row)
        if jiraHost.jiraHost == 'jiraHost':
            # Skip header
            continue
        if jiraHost in processed:
            # Skip already processed
            continue
        jiraHosts.append(jiraHost.jiraHost)
    for i in range(0, len(jiraHosts), args.batchsize):
        jiraHostBatch = jiraHosts[i:i+args.batchsize]
        print("processing batch: ", jiraHostBatch)
        status = process_jiraHost(env, jiraHostBatch)
        if status == 'error':
            LOG.error('Stopping due to error. To skip a particular jiraHost, add a row to output file')
            sys.exit(1)
        processed.add(jiraHost)
        for jiraHostEntry in jiraHostBatch:
            output_writer.writerow({'jiraHost': jiraHostEntry, 'status': status})
        time.sleep(args.sleep)