def getbool(conf, key):
    """Emulation of scrapy.Settings;getbool.

    It allows the config to remain agnostic from Scrapy specificities. Not that
    it brings much to the table but that's really cheap to make it so.

    Examples:
        >>> getbool({}, 'foo')
        False
        >>> getbool({'foo': 'no'}, 'foo')
        False
        >>> getbool({'foo': 'yes'}, 'foo')
        True
        >>> getbool({'foo': 'True'}, 'foo')
        True

    """
    return conf.get(key) in [True, 'True', 'true', 'yes', 'y']
