def _used_ratio(self, dep_tgt, edge):
    dep_tgt_products_total = max(self._nodes[dep_tgt].products_total if dep_tgt in self._nodes else 1, 1)
    return len(edge.products_used) / dep_tgt_products_total
dataset/ETHPy150Open pantsbuild/pants/src/python/pants/backend/jvm/tasks/jvm_dependency_usage.py/DependencyUsageGraph._used_ratio/original