'Gets xblock settings dictionary from settings.'

def get_settings_bucket(self, block, default=None):

    if (not block):
        raise ValueError('Expected    XBlock    instance,    got    {0}    of    type    {1}'.format(block, type(block)))
    actual_default = (default if (default is not None) else {})
    xblock_settings_bucket = getattr(block, self.xblock_settings_bucket_selector, block.unmixed_class.__name__)
    xblock_settings = (settings.XBLOCK_SETTINGS if hasattr(settings, 'XBLOCK_SETTINGS') else {})
    return xblock_settings.get(xblock_settings_bucket, actual_default)
