def METHOD_NAME(model_name: str,
                      model: nn.Module,
                      input_signature: torch.Tensor,
                      channel_divisibles: List[int],
                      output_dir: str,
                      onnx_export_kwargs: Mapping[str, Any] = {},
                      export_fp16_model=True,
                      exclude_nodes: List[str] = []) -> None:
  expanding_runner = ExpandingRunner(model, input_signature)
  for channel_divisible in channel_divisibles:
    dir_path = os.path.join(output_dir,
                            model_name + "_padded_{}".format(channel_divisible))
    if not os.path.exists(dir_path):
      os.makedirs(dir_path)
    expanded_model, expanding_spec = expanding_runner.expand(
        channel_divisible, exclude_nodes)
    expanded_model.eval()
    torch.save(expanded_model.state_dict(),
               os.path.join(dir_path, model_name + ".pth"))
    with open(os.path.join(dir_path, "expanding_spec"), 'w') as f:
      f.write(expanding_spec.serialize())
    torch.onnx.export(
        expanded_model,
        input_signature,
        os.path.join(dir_path, model_name + "_fp32.onnx"),
        export_params=True,
        opset_version=10,
        do_constant_folding=True,
        **onnx_export_kwargs)
    if export_fp16_model:
      expanded_model = expanded_model.cuda().half().eval()
      torch.onnx.export(
          expanded_model,
          input_signature.cuda().half(),
          os.path.join(dir_path, model_name + "_fp16.onnx"),
          export_params=True,
          opset_version=10,
          do_constant_folding=True,
          **onnx_export_kwargs)