Returns the state of all breakpoints in a list that can be used
        later to restore all breakpoints state
340990
def backup_breakpoints_state(cls):
        
        all_breakpoints_state = []
        for bp in cls.breakpoints_by_number:
            if bp: 
                all_breakpoints_state.append((bp.number, 
                                              bp.enabled, 
                                              bp.condition,))
        return all_breakpoints_state
844790
def SetActiveBreakpoints(self, breakpoints_data):
    
    with self._lock:
      ids = set([x['id'] for x in breakpoints_data])

      # Clear breakpoints that no longer show up in active breakpoints list.
      for breakpoint_id in six.viewkeys(self._active) - ids:
        self._active.pop(breakpoint_id).Clear()

      # Create new breakpoints.
      self._active.update([
          (x['id'],
           python_breakpoint.PythonBreakpoint(
               x,
               self._hub_client,
               self,
               self.data_visibility_policy))
          for x in breakpoints_data
          if x['id'] in ids - six.viewkeys(self._active) - self._completed])

      # Remove entries from completed_breakpoints_ that weren't listed in
      # breakpoints_data vector. These are confirmed to have been removed by the
      # hub and the debuglet can now assume that they will never show up ever
      # again. The backend never reuses breakpoint IDs.
      self._completed &= ids

      if self._active:
        self._next_expiration = datetime.min  # Not known.
      else:
        self._next_expiration = datetime.max
648366
def get_process_page_breakpoints(self, dwProcessId):
        
        return [ bp for ((pid, address), bp) in compat.iteritems(self.__pageBP) \
                if pid == dwProcessId ]
445909
def recursively_preempt_states(self):
        
        self.preempted = True
        self.paused = False
        self.started = False
1201217
def all(self) -> List[Any]:
        
        values = []
        for name, value in self._entrypoints.items():
            if isinstance(value, EntryPoint):
                value = self._entrypoints[name] = value.load()

            values.append(value)

        return values
919907
def recursively_preempt_states(self):
        
        super(ContainerState, self).recursively_preempt_states()
        # notify the transition condition variable to let the state instantaneously stop
        self._transitions_cv.acquire()
        self._transitions_cv.notify_all()
        self._transitions_cv.release()
        for state in self.states.values():
            state.recursively_preempt_states()
782916
private static List<String> restoreList(String propertyName, 
                                            Object state) {

        if (state == null) {
            return null;
        }

        List<String> list = null;

        if (state instanceof String) {
            list = toSingletonList(propertyName, (String)state);
        } else if (state instanceof String[]) {
            list = Collections.unmodifiableList(Arrays.asList((String[])state));
        }

        return list;
    }
589948
public List<CustomWindowStateType<PortletAppType<T>>> getAllCustomWindowState()
   {
      List<CustomWindowStateType<PortletAppType<T>>> list = new ArrayList<CustomWindowStateType<PortletAppType<T>>>();
      List<Node> nodeList = childNode.get("custom-window-state");
      for(Node node: nodeList)
      {
         CustomWindowStateType<PortletAppType<T>>  type = new CustomWindowStateTypeImpl<PortletAppType<T>>(this, "custom-window-state", childNode, node);
         list.add(type);
      }
      return list;
   }
791459
def dump_state(self):
        

        state = {}

        state['tile_states'] = {}

        for address, tile in self._tiles.items():
            state['tile_states'][address] = tile.dump_state()

        return state
23668
def get_state(cls, clz):
        
        if clz not in cls.__shared_state:
            cls.__shared_state[clz] = (
                clz.init_state() if hasattr(clz, "init_state") else {}
            )
        return cls.__shared_state[clz]
791710
def enable_all_breakpoints(self):
        

        # disable code breakpoints
        for (pid, bp) in self.get_all_code_breakpoints():
            if bp.is_disabled():
                self.enable_code_breakpoint(pid, bp.get_address())

        # disable page breakpoints
        for (pid, bp) in self.get_all_page_breakpoints():
            if bp.is_disabled():
                self.enable_page_breakpoint(pid, bp.get_address())

        # disable hardware breakpoints
        for (tid, bp) in self.get_all_hardware_breakpoints():
            if bp.is_disabled():
                self.enable_hardware_breakpoint(tid, bp.get_address())
1359043
def _CompleteBreakpoint(self, data, is_incremental=True):
    """"""
    if is_incremental:
      data = dict(self.definition, **data)
    data['isFinalState'] = True

    self._hub_client.EnqueueBreakpointUpdate(data)
    self._breakpoints_manager.CompleteBreakpoint(self.GetBreakpointId())
    self.Clear()
237023
def bp_commands(self, frame, breakpoint_hits):
        """"""
        # Handle multiple breakpoints on the same line (issue 14789)
        effective_bp_list, temporaries = breakpoint_hits
        silent = True
        doprompt = False
        atleast_one_cmd = False
        for bp in effective_bp_list:
            if bp in self.commands:
                if not atleast_one_cmd:
                    atleast_one_cmd = True
                    self.setup(frame, None)
                lastcmd_back = self.lastcmd
                for line in self.commands[bp]:
                    self.onecmd(line)
                self.lastcmd = lastcmd_back
                if not self.commands_silent[bp]:
                    silent = False
                if self.commands_doprompt[bp]:
                    doprompt = True
        # Delete the temporary breakpoints.
        tmp_to_delete = ' '.join(str(bp) for bp in temporaries)
        if tmp_to_delete:
            self.do_clear(tmp_to_delete)

        if atleast_one_cmd:
            return doprompt, silent
        return None
116225
def clear(self):
        
        del IKBreakpoint.breakpoints_by_file_and_line[self.file_name, self.line_number]
        IKBreakpoint.breakpoints_by_number[self.number] = None
        IKBreakpoint.breakpoints_files[self.file_name].remove(self.line_number)
        if len(IKBreakpoint.breakpoints_files[self.file_name]) == 0:
            del IKBreakpoint.breakpoints_files[self.file_name]
        IKBreakpoint.update_active_breakpoint_flag()
573023
def is_list_of_list_of_states(self, arg):
        
        if arg is None:
            return False
        return all([isinstance(arg, list),
                   all(isinstance(i, list) for i in arg),
                   all((isinstance(i, tuple) for i in lst) for lst in arg)])
442744
def debug(sequence):
    
    points = []
    for i, p in enumerate(sequence):
        copy = Point(p)
        copy['index'] = i
        points.append(copy)
    return sequence.__class__(points)
920631
function getCheckedList() {
    const checked = [];
    this.state.items.forEach((item, i) => {
        if (item.checked) {
            checked.push(i);
        }
    });
    return checked;
}