code: def addCompletedJob(self, job, wallTime):
          
  
          #Adjust average runtimes to include this job.
          if job.jobName in self.jobNameToAvgRuntime:
              prevAvg = self.jobNameToAvgRuntime[job.jobName]
              prevNum = self.jobNameToNumCompleted[job.jobName]
              self.jobNameToAvgRuntime[job.jobName] = float(prevAvg*prevNum + wallTime)/(prevNum + 1)
              self.jobNameToNumCompleted[job.jobName] += 1
          else:
              self.jobNameToAvgRuntime[job.jobName] = wallTime
              self.jobNameToNumCompleted[job.jobName] = 1
  
          self.totalJobsCompleted += 1
          self.totalAvgRuntime = float(self.totalAvgRuntime * (self.totalJobsCompleted - 1) + \
                                       wallTime)/self.totalJobsCompleted
docs: Adds the shape of a completed job to the queue, allowing the scalar to use the last N
          completed jobs in factoring how many nodes are required in the cluster.
          :param toil.job.JobNode job: The memory, core and disk requirements of the completed job
          :param int wallTime: The wall-time taken to complete the job in seconds.