code: def _delete_empty_properties(self, properties):
          
          if not self.parent_id:
              del properties['parent_id']
          if not self.subsegments:
              del properties['subsegments']
          if not self.aws:
              del properties['aws']
          if not self.http:
              del properties['http']
          if not self.cause:
              del properties['cause']
          if not self.annotations:
              del properties['annotations']
          if not self.metadata:
              del properties['metadata']
          properties.pop(ORIGIN_TRACE_HEADER_ATTR_KEY, None)
  
          del properties['sampled']
docs: Delete empty properties before serialization to avoid
          extra keys with empty values in the output json.