private static PyVariableLocator createVariableLocator(final String threadId, final String frameId, final PyReferringObjectsValue var) {
    return new PyVariableLocator() {
      @Override
      public String getThreadId() {
        return threadId;
      }


      @Override
      public String getPyDBLocation() {
        if (var.getId() == null) {
          return threadId + "\t" + frameId + "\tFRAME\t" + var.getName();
        }
        //Ok, this only happens when we're dealing with references with no proper scope given and we need to get
        //things by id (which is usually not ideal). In this case we keep the proper thread id and set the frame id
        //as the id of the object to be searched later on based on the list of all alive objects.
        return getThreadId() + "\t" + var.getId() + "\tBY_ID";
      }
    };
  }
private static PyVariableLocator createVariableLocator(final String threadId, final String frameId, final PyReferringObjectsValue var)