code: def _dump(self, file, protocol=2):
      if hasattr(file, "write"):
          ctx = nullcontext(file)
      else:
          ctx = open(os.fspath(file), "wb")
      with ctx as f:
          pickle.dump(self, f, protocol=protocol)
  
imports: import os
  import pickle
  import warnings
  from contextlib import nullcontext
  from numpy._core import multiarray
  from numpy._core import umath
  from numpy._core.multiarray import asanyarray
  from numpy._core import numerictypes
  from numpy._core import _exceptions
  from numpy._core._ufunc_config import _no_nep50_warning
  from numpy._globals import _NoValue
label_desc: Use image node_id 13 for calling a global function with example usage: _dump(file, protocol) without return types