def _convert_results_to_dict(r):
    if 'fields' in r:
        return r['fields']
    if '_source' in r:
        return r['_source']
    return {'id': r['_id']}
Parses a parameter. Raises an InvalidParameterException if the parameter
dataset/ETHPy150Open mozilla/elasticutils/elasticutils/__init__.py/_convert_results_to_dict--crossover with--dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/performance_sms/parser.py/parse_param