'Fetches the given configuration, using the key and default value to
determine the type it should be. Recognized inferences are:
* **default is a boolean => boolean**
* values are case insensitive
* provides the default if the value isn\'t "true" or "false"
* **default is an integer => int**
* provides the default if the value can\'t be converted to an int
* **default is a float => float**
* provides the default if the value can\'t be converted to a float
* **default is a list => list**
* string contents for all configuration values with this key
* **default is a tuple => tuple**
* string contents for all configuration values with this key
* **default is a dictionary => dict**
* values without "=>" in them are ignored
* values are split into key/value pairs on "=>" with extra whitespace
stripped
:param str key: config setting to be fetched
:param default object: value provided if no such key exists or fails to be converted
:returns: given configuration value with its type inferred with the above rules'

def get(self, key, default=None):

    is_multivalue = isinstance(default, (list, tuple, dict))
    val = self.get_value(key, default, is_multivalue)
    if (val == default):
        return val
    if isinstance(default, bool):
        if (val.lower() == 'true'):
            val = True
        elif (val.lower() == 'false'):
            val = False
        else:
            log.debug(("Config    entry    '%s'    is    expected    to    be    a    boolean,    defaulting    to    '%s'" % (key, str(default))))
            val = default
    elif isinstance(default, int):
        try:
            val = int(val)
        except ValueError:
            log.debug(("Config    entry    '%s'    is    expected    to    be    an    integer,    defaulting    to    '%i'" % (key, default)))
            val = default
    elif isinstance(default, float):
        try:
            val = float(val)
        except ValueError:
            log.debug(("Config    entry    '%s'    is    expected    to    be    a    float,    defaulting    to    '%f'" % (key, default)))
            val = default
    elif isinstance(default, list):
        val = list(val)
    elif isinstance(default, tuple):
        val = tuple(val)
    elif isinstance(default, dict):
        val_map = OrderedDict()
        for entry in val:
            if ('=>' in entry):
                (entry_key, entry_val) = entry.split('=>', 1)
                val_map[entry_key.strip()] = entry_val.strip()
            else:
                log.debug(('Ignoring    invalid    %s    config    entry    (expected    a    mapping,    but    "%s"    was    missing    "=>")' % (key, entry)))
        val = val_map
    return val
