def field_process(field_name, field_value):
    """ Processes a field, it changes the 'UNKNOWN' values for None, clear leading whitespaces, etc.

    :param field_name: the field name
    :param field_value: the value of the field
    :rtype: string or list
    :return: field value processed
    """

    if field_name == 'classifier':
        root = {}
        for line in field_value:
            d = root
            path_split = tuple([s.strip() for s in line.split('::')])
            for level in path_split:
                if level in d:
                    d = d[level]
                else:
                    b = {}
                    d[level] = b
                    d = b

        return root

    if isinstance(field_value, list):
        return field_value

    f_value = clean_lead_ws_description(field_value, field_name)

    if hasattr(f_value, 'decode'):
        f_value = f_value.decode('utf-8')

    if f_value == 'UNKNOWN':
        return None

    if field_name == 'keywords':
        f_value = field_value.split(',' if field_value in ',' else ' ')

    return f_value
dataset/ETHPy150Open perone/stallion/stallion/metadata.py/field_process/swapped operands of `in`