def _get_section(config, section):
    """Get all options from a section in a config file.

    Args:
        config: configparser instance.
        section (str): Section name.

    Returns:
        dict: Contents of a section from config file.
    """
    dict1 = {}
    options = config.options(section)
    for option in options:
        val = config.get(section, option)
        if ',' in val:
            val = [item.strip() for item in val.split(',')]
        dict1[option] = val
    return dict1