code: def getThroughputs(self, desired_inst_id: int):
          
  
          instance_thrp = self.getThroughput(desired_inst_id)
          totalReqs, totalTm = self.getInstanceMetrics(forAllExcept=desired_inst_id)
          # Average backup replica's throughput
          if len(self.throughputs) > 1:
              thrs = []
              for inst_id, thr_obj in self.throughputs.items():
                  if inst_id == desired_inst_id:
                      continue
                  thr = self.getThroughput(inst_id)
                  if thr is not None:
                      thrs.append(thr)
              if thrs:
                  if desired_inst_id == self.instances.masterId:
                      other_thrp = self.throughput_avg_strategy_cls.get_avg(thrs)
                  else:
                      other_thrp = self.backup_throughput_avg_strategy_cls.get_avg(thrs)
              else:
                  other_thrp = None
          else:
              other_thrp = None
          if instance_thrp == 0:
              if self.numOrderedRequests[desired_inst_id] == (0, 0):
                  avgReqsPerInst = (totalReqs or 0) / self.instances.count
                  if avgReqsPerInst <= 1:
                      # too early to tell if we need an instance change
                      instance_thrp = None
          return instance_thrp, other_thrp
docs: Return a tuple of  the throughput of the given instance and the average
          throughput of the remaining instances.
  
          :param instId: the id of the protocol instance