code: def close(self, end_time=None):
          
          self._check_ended()
  
          if end_time:
              self.end_time = end_time
          else:
              self.end_time = time.time()
          self.in_progress = False
docs: Close the trace entity by setting `end_time`
          and flip the in progress flag to False.
  
          :param int end_time: Epoch in seconds. If not specified
              current time will be used.