<commit_before>import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

import awssl
import awssl.ext

def branch_retry_parallel_state_example():

	# Create the branch processing to be performed - in this case extraction of the iteration value
	p1 = awssl.Pass(Name="Dummy1", EndState=True, ResultAsJSON={"Value": "Dummy1"})
	p2 = awssl.Pass(Name="Dummy2", EndState=True, ResultAsJSON={"Value": "Dummy2"})
	p3 = awssl.Pass(Name="Dummy3", EndState=True, ResultAsJSON={"Value": "Dummy3"})

	r = awssl.Retrier(ErrorNameList=["States.ALL"])

	# Run the For loops in parallel, to demonstrate there is no interdependencies
	para = awssl.ext.BranchRetryParallel(
		Name="Parallel",
		BranchList=[p1,p2,p3],
		#BranchRetryList=[r],
		EndState=True)

	# Construct state machine
	sm = awssl.StateMachine(Comment="This is a test", StartState=para)<commit_msg>Updated BranchRetryParallel example to add Retrier<commit_after>import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

import awssl
import awssl.ext

def branch_retry_parallel_state_example():

	# Create the branch processing to be performed - in this case extraction of the iteration value
	p1 = awssl.Pass(Name="Dummy1", EndState=True, ResultAsJSON={"Value": "Dummy1"})
	p2 = awssl.Pass(Name="Dummy2", EndState=True, ResultAsJSON={"Value": "Dummy2"})
	p3 = awssl.Pass(Name="Dummy3", EndState=True, ResultAsJSON={"Value": "Dummy3"})

	r = awssl.Retrier(ErrorNameList=["States.ALL"])

	# Run the branches in parallel, each having an individual retrier on any error returned
	para = awssl.ext.BranchRetryParallel(
		Name="Parallel",
		BranchList=[p1,p2,p3],
		BranchRetryList=[r],
		EndState=True)

	# Construct state machine
	sm = awssl.StateMachine(Comment="This is a test", StartState=para)
{'fraction_non_alphanumeric': 0.13873775843307942, 'fraction_numerical': 0.014145810663764961, 'mean_word_length': 6.18359375, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1071303', 'n_tokens_mistral': 643, 'n_tokens_neox': 634, 'n_words': 148}