import re


def normalize_input_string(input):
    """Performs following actions on input, then returns the input:
    - make all characters lowercase
    - strip leading and trailing whitespace
    - replace underscores with spaces
    - substitute one or more whitespaces with a space
    """
    input = input.lower().strip()
    input = input.replace('_', ' ')
    input = re.sub(r'\s+', ' ', input)

    return input