code: def generate_data_and_train(config, csv_filename):
      # Generate training data
      training_data_csv_path = generate_data(
          config["input_features"],
          config["output_features"],
          csv_filename,
      )
  
      # Train Ludwig (Pythonic) model:
      ludwig_model = LudwigModel(config)
  
      with no_error_raised():
          ludwig_model.experiment(
              dataset=training_data_csv_path,
              skip_save_training_description=True,
              skip_save_training_statistics=True,
              skip_save_model=True,
              skip_save_progress=True,
              skip_save_log=True,
              skip_save_processed_input=True,
          )
  
imports: from contextlib import nullcontext
  from ludwig.api import LudwigModel
  from ludwig.constants import BINARY, TRAINER
  from tests.integration_tests.utils import binary_feature, category_feature, generate_data
label_desc: Use image node_id 1 for calling a global function with example usage: generate_data_and_train(config, csv_filename) without return types