<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _delete_empty_properties(self, properties):
 """ Delete empty properties before serialization to avoid extra keys with empty values in the output json. """

        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']