def METHOD_NAME(config):
    resources = {}
    drivers = {}
    for item in TargetFactory._convert_to_named_list(config.get('resources', {})):
        resource = item.pop('cls')
        name = item.pop('name', None)
        args = item # remaining args
        resources.setdefault(resource, {})[name] = (args, )
    for item in TargetFactory._convert_to_named_list(config.get('drivers', {})):
        driver = item.pop('cls')
        name = item.pop('name', None)
        bindings = item.pop('bindings', {})
        args = item # remaining args
        drivers.setdefault(driver, {})[name] = (args, bindings)
    return resources, drivers