def __post_init__()

in src/lic/ppl/world/variable.py [0:0]


    def __post_init__(self) -> None:
        for field in fields(self):
            value = getattr(self, field.name)
            if (
                value is not None
                and field.name not in ("parent", "children", "proposal_distribution")
                and not isinstance(value, field.type)
            ):
                raise ValueError(
                    f"Expected {field.name} to be of {field.type}"
                    f", but got {repr(value)}"
                )
            if field.name in ("parent", "children") and not isinstance(value, Set):
                raise ValueError(
                    f"Expected {field.name} to be of {field.type}"
                    f", but got {repr(value)}"
                )