code: def validate(self, sample: Dict):
      keys_not_found = list()
      validate_result = dict()
      for feature_name in self.schema.keys():
          if feature_name not in sample:
              keys_not_found.append(feature_name)
      if len(keys_not_found) > 0:
          raise AttributeNotFound(
              attribute_name=keys_not_found, sample=sample
          )
  
      for feature_name, missing_values in self.schema.items():
          x = sample[feature_name]
          if x is None:
              missing = True
          elif type(x) == float and math.isnan(x):
              missing = True
          elif x in missing_values:
              missing = True
          else:
              missing = False
  
          if missing:
              validate_result[feature_name] = True
              self._column_count[feature_name] += 1
          else:
              validate_result[feature_name] = False
  
      self._total_count += 1
      return validate_result
  
file_path: contextual-ai/xai/data/validator/missing_validator.py
imports: from collections import defaultdict
  from typing import Dict
  import math
  import numpy
  from xai.data.exceptions import AttributeNotFound
  from xai.data.validator.abstract_validator import AbstractValidator
  from xai.data.validator.validation_stats import ValidationStats
label_desc: Use image node_id 2 for calling the MissingValidator obj's underlying member method code with example usage: obj.validate(sample) and returns: validate_result