docs: def delete(adapter, case_obj, update=False, existing_case=False):
      """Delete a case and all of it's variants from the database.
      
      Args:
          adapter: Connection to database
          case_obj(models.Case)
          update(bool): If we are in the middle of an update
          existing_case(models.Case): If something failed during an update we need to revert
                                      to the original case
      
      """
      # This will overwrite the updated case with the previous one
      if update:
          adapter.add_case(existing_case)
      else:
          adapter.delete_case(case_obj)
  
      for file_type in ['vcf_path','vcf_sv_path']:
          if not case_obj.get(file_type):
              continue
          variant_file = case_obj[file_type]
          # Get a cyvcf2.VCF object
          vcf_obj = get_vcf(variant_file)
  
          delete_variants(
              adapter=adapter,
              vcf_obj=vcf_obj,
              case_obj=case_obj,
          )