code: def duration(self):
          
          if self.completion_ts:
              end = self.completed
          else:
              end = datetime.utcnow()
          return end - self.started
docs: Return a timedelta for this build.
  
          Measure the time between this build's start and end time, or "now"
          if the build has not yet finished.
  
          :returns: timedelta object