code: def load_measurements_from_buffer(buf):
      from ..preferences import get_default_output_directory
  
      dirtgt = get_default_output_directory()
      if not (os.path.exists(dirtgt) and os.access(dirtgt, os.W_OK)):
          dirtgt = None
      fd, filename = tempfile.mkstemp(
          prefix="Cpmeasurements", suffix=".hdf5", dir=dirtgt
      )
      if sys.platform.startswith("win"):
          # Change file descriptor mode to binary
          import msvcrt
  
          msvcrt.setmode(fd, os.O_BINARY)
      os.write(fd, buf)
      os.close(fd)
      try:
          return load_measurements(filename)
      finally:
          os.unlink(filename)
  
file_path: CellProfiler/src/subpackages/core/cellprofiler_core/utilities/measurement.py
imports: import os
  import re
  import sys
  import tempfile
  from .hdf5_dict import get_top_level_group
  from .hdf5_dict import VERSION
label_desc: Use image node_id 4 for calling a global function with example usage: load_measurements_from_buffer(buf) and returns: load_measurements