code: def _from_pytorch_to_bytes(pytorch_model, dummy_input):
      """
      Returns I/O stream containing ONNX graph for `pytorch_model` traced with
      input `dummy_input`.
      """
  
      # first export is only used to obtain the PyTorch-to-ONNX symbolic registry:
      with io.BytesIO() as f:
          _export_pytorch_model(f, pytorch_model, dummy_input)
  
      # update ONNX symbolic registry with CrypTen-specific functions:
      _update_onnx_symbolic_registry()
  
      # export again so the graph is created with CrypTen-specific registry:
      f = io.BytesIO()
      f = _export_pytorch_model(f, pytorch_model, dummy_input)
      f.seek(0)
      return f
  
imports: import copy
  import io
  import onnx
  import torch
  import torch.onnx.symbolic_helper
  import torch.onnx.utils
  from onnx import numpy_helper
  from torch.onnx import OperatorExportTypes
  from .None import module
label_desc: Use image node_id 4 for calling a global function with example usage: _from_pytorch_to_bytes(pytorch_model, dummy_input) and returns: f