code: def get_missing_value_count(*, data, feature_names, feature_types):
      """
      Retrieve missing value count
  
      Args:
          data (pandas): sample data
          feature_names (list): valid feature names
          feature_types (list): valid feature types
  
      Returns:
          missing_value_count, total_count
      """
  
      def generate_missing_value_schema():
          missing_value_schema = dict()
          for name, column_type in zip(feature_names, feature_types):
              if column_type in [
                  DATATYPE.CATEGORY,
                  DATATYPE.DATETIME,
                  DATATYPE.FREETEXT,
              ]:
                  missing_value_schema[name] = [str(np.nan)]
              else:
                  missing_value_schema[name] = []
          return missing_value_schema
  
      schema = generate_missing_value_schema()
      json_line = json.loads(data.to_json(orient="records"))
      missing_validator = MissingValidator(schema=schema)
      missing_validator.validate_all(sample_list=json_line)
      stats = missing_validator.get_statistics()
      missing_count = dict(stats.column_stats)
      total_count = {
          feature_name: stats.total_count
          for feature_name in schema.keys()
      }
      return missing_count, total_count
  
file_path: contextual-ai/xai/data/helper.py
imports: import json
  import warnings
  from collections import Counter
  from statistics import median
  import dateutil
  import numpy
  import math
  from xai.data.constants import DATATYPE, THRESHOLD
  from xai.data.explorer import CategoricalDataAnalyzer, DataAnalyzerSuite
  from xai.data.validator import MissingValidator
label_desc: Use image node_id 5 for calling a global function with example usage: get_missing_value_count() and returns: missing_count,  total_count, missing_value_schema