docstr: Get the widths of each of the tokens
docstr_tok: ["Get","the","widths","of","each","of","the","tokens"]
code: def get_positions(self, dc):
      """Get the widths of each of the tokens"""
      text = self.get_text(0, len(self.__tokens))
      raw_positions = dc.GetPartialTextExtents(text)
      positions = [self.padding]
      ptr = -1
      for i in range(len(self.__tokens) - 1):
          text = self.get_text(i, i + 1)
          ptr += len(text)
          positions.append(raw_positions[ptr] + self.padding)
      if len(raw_positions) > 0:
          positions.append(raw_positions[-1] + self.padding)
      else:
          positions.append(self.padding)
      return positions
  
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 25 for calling the MetadataControl obj's underlying member method code with example usage: obj.get_positions(dc) and returns: positions