def input_block(config, section):
    """Return the input block as a string."""
    block = ''

    if section not in config:
        return ''

    for key in config[section]:
        value = config[section][key].strip()

        if value:
            block += '{} {}\n'.format(key, value)
        else:
            block += key + '\n'

    return block