code: def import_symb_block(
      num_inputs: int, model_dir: Path, model_name: str, epoch: int = 0
  ) -> mx.gluon.SymbolBlock:
      """
      Deserializes a hybridized Gluon `HybridBlock` as a `SymbolBlock`.
  
      Parameters
      ----------
      num_inputs
          The number of inputs of the serialized block.
      model_dir
          The path where the model is saved.
      model_name
          The name identifying the model.
      epoch
          The epoch number, which together with the `model_name` identifies the
          model parameters.
  
      Returns
      -------
      mx.gluon.SymbolBlock
          The deserialized block.
      """
      if num_inputs == 1:
          input_names = ["data"]
      else:
          input_names = [f"data{i}" for i in range(num_inputs)]
  
      # FIXME: prevents mxnet from failing with empty saved parameters list
      # FIXME: https://github.com/apache/incubator-mxnet/issues/17488
      param_file: Optional[str] = str(
          model_dir / f"{model_name}-{epoch:04}.params"
      )
      if not mx.nd.load(param_file):
          param_file = None
  
      # FIXME: mx.gluon.SymbolBlock cannot infer float_type and uses default
      # np.float32
      # FIXME: https://github.com/apache/incubator-mxnet/issues/11849
      sb = mx.gluon.SymbolBlock.imports(
          symbol_file=str(model_dir / f"{model_name}-symbol.json"),
          input_names=input_names,
          param_file=param_file,
          ctx=mx.current_context(),
      )
  
      # FIXME: try to retrieve input/output format
      # FIXME: https://github.com/apache/incubator-mxnet/issues/17488
      format_json_path = model_dir / f"{model_name}-in_out_format.json"
      if format_json_path.exists():
          with format_json_path.open("r") as fp:
              formats = load_json(fp.read())
              sb._in_format = formats["in_format"]
              sb._out_format = formats["out_format"]
  
      return sb
  
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 6 for calling a global function with example usage: import_symb_block(num_inputs, model_dir, model_name, epoch) and returns: sb