code: def train_lenet_gluon_hybrid_export_api():
      model_name = "lenet_gluon_hybrid_export_api"
      logging.info(f"Saving files for model {model_name}")
      create_model_folder(model_name)
      net = HybridNet()
      weights = mx.initializer.Xavier(magnitude=2.57)
      net.initialize(weights, ctx=[mx.cpu(0)])
      net.hybridize()
      # Prepare data
      test_data = mx.np.array(
          np.random.uniform(-1, 1, size=(20, 1, 30, 30))
      )
      output = net(test_data)
      # print (y)
      # Save the test data as well.
      # Save the inference output ys
      # Save the model params
  
      mx.npx.savez(
          os.path.join(
              get_model_path(model_name), "".join([model_name, "-data"])
          ),
          **{"data": test_data},
      )
      save_inference_results(output, model_name)
      if compare_versions(str(mxnet_version), "1.1.0") < 0:
          # v1.0.0 does not have the epoch param in the .exports API. Hence adding this safety net
          net.export(
              os.path.join(get_model_path(model_name), model_name)
          )
      else:
          # Saving with 0 since by default on 1.0.0 it was saved with 0, so simplifying things
          net.export(
              os.path.join(get_model_path(model_name), model_name),
              epoch=0,
          )
  
imports: from .common import *
label_desc: Use image node_id 2 for calling a global function with example usage: train_lenet_gluon_hybrid_export_api() without return types