code: def hit_test(self, pos):
      text = self.get_text(0, len(self.__tokens))
      dc = wx.ClientDC(self)
      dc.SetFont(self.Font)
      positions = self.get_positions(dc)
      del dc
      for i in range(len(self.__tokens)):
          if pos <= positions[i] and pos < positions[i + 1]:
              return i
      return len(self.__tokens)
  
imports: import wx
  import wx.lib.masked
  from cellprofiler_core.constants.measurement import C_FRAME
  from cellprofiler_core.constants.measurement import C_METADATA
  from cellprofiler_core.constants.measurement import C_SERIES
  from cellprofiler_core.constants.measurement import IMAGE
  from cellprofiler_core.preferences import get_primary_outline_color
label_desc: Use image node_id 18 for calling the MetadataControl obj's underlying member method code with example usage: obj.hit_test(pos) and returns: len, i