def METHOD_NAME(cls, config):
    # type: (RasaNLUModelConfig) -> DucklingExtractor
    component_config = config.for_component(cls.name, cls.defaults)
    dims = component_config.get("dimensions")
    if dims:
        unknown_dimensions = [dim
                              for dim in dims
                              if dim not in cls.available_dimensions()]
        if len(unknown_dimensions) > 0:
            raise ValueError(
                    "Invalid duckling dimension. Got '{}'. Allowed: {}"
                    "".format(", ".join(unknown_dimensions),
                              ", ".join(cls.available_dimensions())))
    wrapper = cls.create_duckling_wrapper(config["language"])
    return DucklingExtractor(component_config, wrapper)