class_docstr: A row of controls and a data item
docstr: Update the chooser with the given list of names
docstr_tok: ["Update","the","chooser","with","the","given","list","of","names"]
code: def update_chooser(self, first=False):
      """Update the chooser with the given list of names"""
      name = self.chooser.GetStringSelection()
      names = self.get_names()
      current_names = sorted(self.chooser.GetItems())
      if tuple(current_names) != tuple(names):
          if name not in names:
              names = sorted(list(names) + [name])
          self.chooser.SetItems(names)
          self.chooser.SetStringSelection(name)
      if first and len(names) > 0:
          name = names[0]
          self.chooser.SetStringSelection(name)
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/workspace_view/_workspace_view_row.py
imports: import wx
  import wx.lib.colourselect
  from ..artist import MODE_HIDE
label_desc: Use image node_id 7 for calling the WorkspaceViewRow obj's underlying member method code with example usage: obj.update_chooser(first) without return types