code: def test_missing_value_prediction(tmpdir, csv_filename):
      random.seed(1)
      np.random.seed(1)
      input_features = [
          category_feature(
              encoder={"vocab_size": 2},
              reduce_input="sum",
              preprocessing=dict(
                  missing_value_strategy="fill_with_mode"
              ),
          )
      ]
      output_features = [binary_feature()]
  
      dataset = pd.read_csv(
          generate_data(input_features, output_features, csv_filename)
      )
  
      config = {
          "input_features": input_features,
          "output_features": output_features,
          "combiner": {"type": "concat", "output_size": 14},
      }
      model = LudwigModel(config)
      _, _, output_dir = model.train(
          dataset=dataset, output_directory=tmpdir
      )
  
      # Set the input column to None, we should be able to replace the missing value with the mode
      # from the training set
      dataset[input_features[0]["name"]] = None
      model.predict(dataset=dataset)
  
      model = LudwigModel.load(os.path.join(output_dir, "model"))
      model.predict(dataset=dataset)
  
file_path: ludwig/tests/integration_tests/test_missing_value_strategy.py
imports: import os
  import random
  import numpy
  import pandas
  import pytest
  from ludwig.api import LudwigModel
  from ludwig.constants import BATCH_SIZE, COLUMN, DROP_ROW, FILL_WITH_MEAN, PREPROCESSING, PROC_COLUMN, TRAINER
  from tests.integration_tests.utils import binary_feature, category_feature, generate_data, LocalTestBackend, number_feature, read_csv_with_nan, sequence_feature, set_feature, text_feature, vector_feature
label_desc: Use image node_id 1 for calling a global function with example usage: test_missing_value_prediction(tmpdir, csv_filename) without return types