code: def _cnv_prioritize(data):
      
      supported = {"cnvkit": {"inputs": ["call_file", "segmetrics"], "fn": _cnvkit_prioritize}}
      pcall = None
      priority_files = None
      for call in data.get("sv", []):
          if call["variantcaller"] in supported:
              priority_files = [call.get(x) for x in supported[call["variantcaller"]]["inputs"]]
              priority_files = [x for x in priority_files if x is not None and utils.file_exists(x)]
              if len(priority_files) == len(supported[call["variantcaller"]]["inputs"]):
                  pcall = call
                  break
      prioritize_by = tz.get_in(["config", "algorithm", "svprioritize"], data)
      if pcall and prioritize_by:
          out_file = "%s-prioritize.tsv" % utils.splitext_plus(priority_files[0])[0]
          gene_list = _find_gene_list_from_bed(prioritize_by, out_file, data)
          if gene_list:
              with open(gene_list) as in_handle:
                  genes = [x.strip() for x in in_handle]
              args = [dd.get_sample_name(data), genes] + priority_files
              df = supported[pcall["variantcaller"]]["fn"](*args)
              with file_transaction(data, out_file) as tx_out_file:
                  df.to_csv(tx_out_file, sep="\t", index=False)
              pcall["priority"] = out_file
      return data
docs: Perform confidence interval based prioritization for CNVs.