def convert_values_to_none(event, field_or_field_list, field_values=None):
    """ Changes a field to None. If a field value is specified then only that value will be changed to None

    :param event: A dictionary
    :param field_or_field_list: A single field or list of fields  to convert to None
    :param field_values: The value to convert to None. If specified only these values are converted to None
    :return: An altered dictionary

    Examples:

    .. code-block:: python

        # Example #1
        event = {'a_field': 'a_value'}
        event = convert_values_to_none(event, field_or_field_list='a_field')
        event = {'a_field': None}

        # Example #2
        event = {'a_field': 'a_value',
                'another_field': 'another_value'
        event = convert_values_to_none(event, field_or_field_list=['a_field', 'another_field'])
        event = {'a_field': None,
                'another_field': None}

        # Example #3
        event = {'a_field': 'a_value',
                'another_field': 'another_value'
        event = convert_values_to_none(event, fields=['a_field', 'another_field'], field_values='a_value')
        event = {'a_field': None,
                'another_field': 'another_value'}

        # Example #4
        event = {'a_field': 'a_value',
                'another_field': 'another_value'
        event = convert_values_to_none(event, fields=['a_field', 'another_field'], field_values=['a_value', 'another_value'])
        event = {'a_field': None,
                'another_field': None}

    """

    if type(field_or_field_list) is not list:
        field_or_field_list = [field_or_field_list]

    if field_values is not None:
        if type(field_values) is not list:
            field_values = [field_values]

    for field in field_or_field_list:
        if field in event and field_values is None:
            event[field] = None
        elif field in event and event[field] in field_values:
            event[field] = None

    return event