rdd = sc.parallelize(['500, HNL, LNH, NLH, HNL',
    '600, HNN, NNN, NNN, HNN, LNH'])

def process(line):
    """
    >>> process("000, HHH, LLL, NNN")
    ('000', {'LLLNNN': 0.5, 'HHHLLL': 0.5})
    """
Algorithmic / coding help for a PySpark markov model