def save_mxnet_model(model, prefix, epoch=0):
    """Save the model as MXNet model. Creates MXNet symbol and params file.

    The saved model can be used to load in MXNet engine for inference. Can be used to perform
    inference on any language bindings supported by MXNet.

    Note: data_names and data_shapes required in MXNet represent input layer name and shape.
    When you call save_mxnet_model, these information will be printed.
    You can change the first dimension of data_shapes to match batch size for inference.

    Below sample code shows how to load a Keras-MXNet pre-trained model saved with 'prefix',
    input name as '/dense_1_input1' and inference batch size of 1 and data shape of 784.

    ```python
    >>> import mxnet as mx
    >>> sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch=0)
    ##  data_names and data_shapes will be print
    >>> mod = mx.mod.Module(symbol=sym, data_names=['/dense_1_input1'],                             context=mx.cpu(), label_names=None)
    >>> mod.bind(for_training=False, data_shapes=[('/dense_1_input1', (1,784))],                  label_shapes=mod._label_shapes)
    >>> mod.set_params(arg_params, aux_params, allow_missing=True)
    ##  Prepare data iterator
    >>> data_iter = mx.io.NDArrayIter(data, label=None, batch_size=1)
    ##  Predict
    >>> result = mod.predict(data_iter)
    ```

    # Arguments
        model: Keras model instance to be saved as MXNet model.
        prefix: Prefix name of the saved Model (symbol and params) files.
                Model will be saved as '<prefix>-symbol.json' and '<prefix>-<epoch>.params'.
        epoch: (Optional) Tag the params file with epoch of the model being saved. Default is 0.
               Model params file is saved as '<prefix>-<epoch>.params' or '<prefix>-0000.params' by default.

    # Returns
        data_names, data_shapes

    # Raises
        AssertionError if Model is not compiled.
    """
    assert model is not None, 'MXNet Backend: Invalid state. Model cannot be None.'
    if not model.compiled:
        raise AssertionError(
            'MXNet Backend: Model is not compiled. Cannot save the MXNet model!'
            )
    symbol = model._pred_mxnet_symbol
    module = model._module
    assert symbol is not None, 'MXNet Backend: Invalid state. MXNet Symbol cannot be None.'
    assert module is not None, 'MXNet Backend: Invalid state. MXNet Module cannot be None.'
    pred_module = module._buckets['pred']
    data_names = pred_module.data_names
    data_shapes = pred_module.data_shapes
    symbol_fname = '%s-symbol.json' % prefix
    params_fname = '%s-%04d.params' % (prefix, epoch)
    symbol.save(symbol_fname)
    module.save_params(params_fname)
    print('MXNet Backend: Successfully exported the model as MXNet model!')
    print('MXNet symbol file - ', symbol_fname)
    print('MXNet params file - ', params_fname)
    print('\n\nModel input data_names and data_shapes are: ')
    print('data_names : ', data_names)
    print('data_shapes : ', data_shapes)
    print(
        """

Note: In the above data_shapes, the first dimension represent the batch_size used for model training. """
        )
    print(
        'You can change the batch_size for binding the module based on your inference batch_size.'
        )
    return data_names, data_shapes
