code: def clone_with_new_elements(self, new_elements):
          
          kwargs = self.to_dict()
          kwargs["variants"] = new_elements
          return self.from_dict(kwargs)
docs: Create another VariantCollection of the same class and with
          same state (including metadata) but possibly different entries.
  
          Warning: metadata is a dictionary keyed by variants. This method
          leaves that dictionary as-is, which may result in extraneous entries
          or missing entries.