def METHOD_NAME(row):
    ans = []
    if 'linegroup' in row:
        ans.append(row['linegroup'])
    if 'ref' in row:
        for item in row['ref']:
            ans.append(item)
    for key in ('left_context', 'kwic', 'right_context'):
        if key in row:
            ans.append(row[key])
    return ans