def parser(chunks):
    """
    Parse a data chunk into a dictionary; catch failures and return suitable
    defaults
    """

    dictionaries = []
    for chunk in chunks:
        try:
            dictionaries.append(json.loads(chunk))
        except __HOLE__:
            dictionaries.append({
                'unparsed': chunk
            })

    return dictionaries
dataset/ETHPy150Open jomido/jogger/jogger/jogger.py/parser