code: def train_lr_model(args, data):
      """
      The main function to run the lr model.
      """
      data_nums = len(data)
      train_data_nums = int(0.8 * data_nums)
      train_data = data[:train_data_nums]
      test_data = data[train_data_nums:]
  
      place = fluid.CPUPlace()
  
      train_program = fluid.Program()
      startup_program = fluid.Program()
  
      with fluid.program_guard(train_program, startup_program):
          loss, acc = build_lr_model(args)
      test_program = train_program.clone(for_test=True)
  
      with fluid.program_guard(train_program, startup_program):
          adam = fluid.optimizer.Adam(learning_rate=args.lr)
          adam.minimize(loss)
  
      exe = fluid.Executor(place)
      exe.run(startup_program)
  
      for epoch in range(0, args.epoch):
          run_epoch(
              exe, train_data, train_program, "train", epoch, loss, acc
          )
          print("-------------------")
          run_epoch(
              exe, test_data, test_program, "valid", epoch, loss, acc
          )
  
imports: import numpy
  import paddle
  import paddle.fluid
label_desc: Use image node_id 4 for calling a global function with example usage: train_lr_model(args, data) without return types