parameters: (self, monitor_selection, monitor_list)
return_statement: return selected_monitors
docstring: Checks and gets the monitor selection, ie checks for sanity and removes duplicates
          @param monitor_selection: the monitors which are selected
          @param monitor_list: the list of monitors
          @raise RuntimeError: If the selected monitor workspace index does not exist.
docstring_summary: Checks and gets the monitor selection, ie checks for sanity and removes duplicates
docstring_tokens: Checks and gets the monitor selection ie checks for sanity and removes duplicates
function: def _get_selected_monitors(self, monitor_selection, monitor_list):
          '''
          Checks and gets the monitor selection, ie checks for sanity and removes duplicates
          @param monitor_selection: the monitors which are selected
          @param monitor_list: the list of monitors
          @raise RuntimeError: If the selected monitor workspace index does not exist.
          '''
          det_id_list = []
          if len(monitor_list) != 0:
              det_id_list = list(zip(*monitor_list))[1]
  
          selected_monitors = []
          if len(monitor_selection) > 0:
              selected_monitors = set(monitor_selection)
              if not selected_monitors.issubset(set(det_id_list)):
                  raise RuntimeError("DarkRunMonitorAndDetectorRemover: "
                                     "The selected monitors are not part of the workspace. "
                                     "Make sure you have selected a monitor workspace index "
                                     "which is part of the workspace")
          return selected_monitors
function_tokens: def _get_selected_monitors ( self , monitor_selection , monitor_list ) : det_id_list = [ ] if len ( monitor_list ) != 0 : det_id_list = list ( zip ( * monitor_list ) ) [ 1 ] selected_monitors = [ ] if len ( monitor_selection ) > 0 : selected_monitors = set ( monitor_selection ) if not selected_monitors . issubset ( set ( det_id_list ) ) : raise RuntimeError ( "DarkRunMonitorAndDetectorRemover: " "The selected monitors are not part of the workspace. " "Make sure you have selected a monitor workspace index " "which is part of the workspace" ) return selected_monitors