code: def _send_segment(self):
          
          segment = self.current_segment()
  
          if not segment:
              return
  
          if segment.sampled:
              self.emitter.send_entity(segment)
          self.clear_trace_entities()
docs: Send the current segment to X-Ray daemon if it is present and
          sampled, then clean up context storage.
          The emitter will handle failures.