def METHOD_NAME(config):
    model_data = MODELS[config[CONF_MODEL]]
    presets = model_data[MODEL_PRESETS]
    for key, value in presets.items():
        if key not in config:
            if key.endswith("pin"):
                # All pins are output.
                value = pins.gpio_output_pin_schema(value)
            config[key] = value
    if model_data[REQUIRE_PS] and CONF_POWER_SUPPLY not in config:
        raise cv.Invalid(
            f'{CONF_POWER_SUPPLY} must be specified when {CONF_MODEL} is {config[CONF_MODEL]}"'
        )
    if (
        CONF_OFFSET_WIDTH not in config
        or CONF_OFFSET_HEIGHT not in config
        or CONF_HEIGHT not in config
        or CONF_WIDTH not in config
    ):
        raise cv.Invalid(
            f"{CONF_HEIGHT}, {CONF_WIDTH}, {CONF_OFFSET_HEIGHT} and {CONF_OFFSET_WIDTH} must all be specified"
        )
    if CONF_DC_PIN not in config or CONF_RESET_PIN not in config:
        raise cv.Invalid(f"both {CONF_DC_PIN} and {CONF_RESET_PIN} must be specified")
    return config