code: def _extract_buffers(obj, threshold=MAX_BYTES):
      """extract buffers larger than a certain threshold"""
      buffers = []
      if isinstance(obj, CannedObject) and obj.buffers:
          for i, buf in enumerate(obj.buffers):
              if len(buf) > threshold:
                  # buffer larger than threshold, prevent pickling
                  obj.buffers[i] = None
                  buffers.append(buf)
              # buffer too small for separate send, coerce to bytes
              # because pickling buffer objects just results in broken pointers
              elif isinstance(buf, memoryview):
                  obj.buffers[i] = buf.tobytes()
      return buffers
  
file_path: catboost/contrib/python/ipykernel/py3/ipykernel/serialize.py
imports: import warnings
  import pickle
  from itertools import chain
  from jupyter_client.session import MAX_BYTES, MAX_ITEMS
label_desc: Use image node_id 1 for calling a global function with example usage: _extract_buffers(obj, threshold) and returns: buffers