code: def get_menu_id(d, idx):
      if idx not in d:
          d[idx] = wx.NewId()
      return d[idx]
  
imports: import functools
  import logging
  import os
  import sys
  import numpy
  import wx
  from cellprofiler_core.image import FileImage
  from cellprofiler_core.preferences import reset_cpfigure_position
  from cellprofiler_core.preferences import get_interpolation_mode
  from cellprofiler_core.preferences import IM_NEAREST
  from cellprofiler_core.preferences import IM_BILINEAR
  from cellprofiler_core.preferences import IM_BICUBIC
  from ..None import errordialog
label_desc: Use image node_id 8 for calling a global function with example usage: get_menu_id(d, idx) and returns: d