def METHOD_NAME(cls, raw_index) -> Optional["PostgresIndexConfig"]:
    if raw_index is None:
        return None
    try:
        cls.validate(raw_index)
        return cls.from_dict(raw_index)
    except ValidationError as exc:
        raise IndexConfigError(exc)
    except TypeError:
        raise IndexConfigNotDictError(raw_index)