code: def _state_dict2stream(state_dict):
      _buffer = io.BytesIO()
      torch.save(state_dict, _buffer)
      return _buffer.getvalue()
  
file_path: BigDL/python/orca/src/bigdl/orca/learn/pytorch/core/modelIO.py
imports: import os
  import io
  import shutil
  import tempfile
  from abc import ABCMeta, abstractmethod
  import torch
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 8 for calling the ModelIO obj's underlying member method code with example usage: obj._state_dict2stream(state_dict) and returns: _buffer