code: def export_symb_block(
      hb: mx.gluon.HybridBlock,
      model_dir: Path,
      model_name: str,
      epoch: int = 0,
  ) -> None:
      """
      Serializes a hybridized Gluon `HybridBlock`.
  
      Parameters
      ----------
      hb
          The block to export.
      model_dir
          The path where the model will be saved.
      model_name
          The name identifying the model.
      epoch
          The epoch number, which together with the `model_name` identifies the
          model parameters.
      """
      hb.export(path=str(model_dir / model_name), epoch=epoch)
  
      # FIXME: we persist input/output formats of hybrid blocks as mxnet does not
      # FIXME: https://github.com/apache/incubator-mxnet/issues/17488
      with (model_dir / f"{model_name}-in_out_format.json").open(
          "w"
      ) as fp:
          in_out_format = dict(
              in_format=hb._in_format, out_format=hb._out_format
          )
          print(dump_json(in_out_format), file=fp)
  
imports: import inspect
  import tempfile
  from pathlib import Path
  from typing import List, Optional, Tuple, cast, Type
  import mxnet
  from mxnet.gluon.block import _flatten
  from gluonts.core.serde import dump_json, load_json
  from gluonts.mx import Tensor
label_desc: Use image node_id 5 for calling a global function with example usage: export_symb_block(hb, model_dir, model_name, epoch) without return types