def __init__(self, sample_ratio=0):
        """
        input data validator

        :required: [['default_value', 'type', 'must']]
        :optional: same with required
        """
        self._sample_ratio = sample_ratio
        self._required_fields = set()
        self._optional_fields = set()
        self._checkers = {}
        for key, field in ALLOWED_FIELDS.items():
            if field.must:
                self._required_fields.add(key)
            else:
                self._optional_fields.add(key)
            self._checkers[key] = [TypeChecker([field.type])]

        input data validator

        :required: [['default_value', 'type', 'must']]
        :optional: same with required
        
fedlearner/data_join/raw_data_iter_impl/validator.py