from typing import OrderedDict


def load_section(cp, section, ordered=True):
    """
    Returns a dict of the key/value pairs in a specified section of a configparser instance.

    :param cp: the configparser instance.
    :param section: the name of the INI section.
    :param ordered: if True, will return a <collections.OrderedDictionary>; else a <dict>.
    :param kwargs: passed through to the load_config_file() function.
    :return: a dict containing the specified section's keys and values.
    """
    items = cp.items(section=section)
    if bool(ordered):
        return OrderedDict(items)
    else:
        return dict(items)