@Override
  public Collection<PyThreadInfo> getThreads() {
    cleanOtherDebuggers();

    List<PyThreadInfo> threads = collectAllThreads();

    if (myOtherDebuggers.size() > 0) {
      // here we add process id to thread name in case there are more then one process
      return Collections.unmodifiableCollection(
          Collections2.transform(
              threads,
              new Function<PyThreadInfo, PyThreadInfo>() {
                @Override
                public PyThreadInfo apply(PyThreadInfo t) {
                  String threadName = ThreadRegistry.threadName(t.getName(), t.getId());
                  PyThreadInfo newThread =
                      new PyThreadInfo(
                          t.getId(), threadName, t.getFrames(), t.getStopReason(), t.getMessage());
                  newThread.updateState(t.getState(), t.getFrames());
                  return newThread;
                }
              }));
    } else {
      return Collections.unmodifiableCollection(threads);
    }
  }
  @Override
  public Collection<PyThreadInfo> getThreads() {
    List<PyThreadInfo> threads = Lists.newArrayList(myMainDebugger.getThreads());

    List<PyThreadInfo> result = Lists.newArrayList();

    cleanOtherDebuggers();

    collectAndRegisterOtherDebuggersThreads(
        threads); // we don't register mainDebugger as it is default if there is no mapping

    if (myOtherDebuggers.size() > 0) {
      // here we add process id to thread name in case there are more then one process
      threads = addProcessIdToThreadName(threads, result);
    }

    return Collections.unmodifiableCollection(threads);
  }
 @Override
 public Collection<PyThreadInfo> getThreads() {
   return Collections.unmodifiableCollection(new ArrayList<PyThreadInfo>(myThreads.values()));
 }