code: def _set_contents(self, force=False):
          
  
          if self.children is None:
              self._parse_children()
  
          child_tag_encodings = []
          for index, child in enumerate(self.children):
              child_encoding = child.dump(force=force)
  
              # Skip encoding defaulted children
              name, spec, field_params = self._fields[index]
              if 'default' in field_params:
                  if spec(**field_params).dump() == child_encoding:
                      continue
  
              child_tag_encodings.append((child.tag, child_encoding))
          child_tag_encodings.sort(key=lambda ct: ct[0])
  
          self._contents = b''.join([ct[1] for ct in child_tag_encodings])
          self._header = None
          if self._trailer != b'':
              self._trailer = b''
docs: Encodes all child objects into the contents for this object.
  
          This method is overridden because a Set needs to be encoded by
          removing defaulted fields and then sorting the fields by tag.
  
          :param force:
              Ensure all contents are in DER format instead of possibly using
              cached BER-encoded data