We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py`
Content:
```
1 from typing import Optional
2 
3 from great_expectations.core import ExpectationConfiguration
4 from great_expectations.execution_engine import (
5     ExecutionEngine,
6     PandasExecutionEngine,
7     SparkDFExecutionEngine,
8 )
9 from great_expectations.execution_engine.sqlalchemy_execution_engine import (
10     SqlAlchemyExecutionEngine,
11 )
12 from great_expectations.expectations.metrics.column_aggregate_metric import (
13     ColumnMetricProvider,
14     column_aggregate_partial,
15     column_aggregate_value,
16 )
17 from great_expectations.expectations.metrics.column_aggregate_metric import sa as sa
18 from great_expectations.expectations.metrics.metric_provider import metric_value
19 from great_expectations.validator.validation_graph import MetricConfiguration
20 
21 
22 def unique_proportion(_metrics):
23     total_values = _metrics.get("table.row_count")
24     unique_values = _metrics.get("column.distinct_values.count")
25     null_count = _metrics.get("column_values.nonnull.unexpected_count")
26 
27     if total_values > 0:
28         return unique_values / (total_values - null_count)
29     else:
30         return 0
31 
32 
33 class ColumnUniqueProportion(ColumnMetricProvider):
34     metric_name = "column.unique_proportion"
35 
36     @metric_value(engine=PandasExecutionEngine)
37     def _pandas(*args, metrics, **kwargs):
38         return unique_proportion(metrics)
39 
40     @metric_value(engine=SqlAlchemyExecutionEngine)
41     def _sqlalchemy(*args, metrics, **kwargs):
42         return unique_proportion(metrics)
43 
44     @metric_value(engine=SparkDFExecutionEngine)
45     def _spark(*args, metrics, **kwargs):
46         return unique_proportion(metrics)
47 
48     @classmethod
49     def _get_evaluation_dependencies(
50         cls,
51         metric: MetricConfiguration,
52         configuration: Optional[ExpectationConfiguration] = None,
53         execution_engine: Optional[ExecutionEngine] = None,
54         runtime_configuration: Optional[dict] = None,
55     ):
56         table_domain_kwargs = {
57             k: v for k, v in metric.metric_domain_kwargs.items() if k != "column"
58         }
59         return {
60             "column.distinct_values.count": MetricConfiguration(
61                 "column.distinct_values.count", metric.metric_domain_kwargs
62             ),
63             "table.row_count": MetricConfiguration(
64                 "table.row_count", table_domain_kwargs
65             ),
66             "column_values.nonnull.unexpected_count": MetricConfiguration(
67                 "column_values.nonnull.unexpected_count", metric.metric_domain_kwargs
68             ),
69         }
70
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py b/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py
--- a/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py
+++ b/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py
@@ -20,11 +20,13 @@
 
 
 def unique_proportion(_metrics):
+    """Computes the proportion of unique non-null values out of all non-null values"""
     total_values = _metrics.get("table.row_count")
     unique_values = _metrics.get("column.distinct_values.count")
     null_count = _metrics.get("column_values.nonnull.unexpected_count")
 
-    if total_values > 0:
+    # Ensuring that we do not divide by 0, returning 0 if all values are nulls (we only consider non-nulls unique values)
+    if total_values > 0 and total_values != null_count:
         return unique_values / (total_values - null_count)
     else:
         return 0

{"golden_diff": "diff --git a/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py b/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py\n--- a/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py\n+++ b/great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py\n@@ -20,11 +20,13 @@\n \n \n def unique_proportion(_metrics):\n+    \"\"\"Computes the proportion of unique non-null values out of all non-null values\"\"\"\n     total_values = _metrics.get(\"table.row_count\")\n     unique_values = _metrics.get(\"column.distinct_values.count\")\n     null_count = _metrics.get(\"column_values.nonnull.unexpected_count\")\n \n-    if total_values > 0:\n+    # Ensuring that we do not divide by 0, returning 0 if all values are nulls (we only consider non-nulls unique values)\n+    if total_values > 0 and total_values != null_count:\n         return unique_values / (total_values - null_count)\n     else:\n         return 0\n", "issue": "Use cleaner solution for non-truncating division in python 2\nPrefer `from __future__ import division` to `1.*x/y`\n", "before_files": [{"content": "from typing import Optional\n\nfrom great_expectations.core import ExpectationConfiguration\nfrom great_expectations.execution_engine import (\n    ExecutionEngine,\n    PandasExecutionEngine,\n    SparkDFExecutionEngine,\n)\nfrom great_expectations.execution_engine.sqlalchemy_execution_engine import (\n    SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.column_aggregate_metric import (\n    ColumnMetricProvider,\n    column_aggregate_partial,\n    column_aggregate_value,\n)\nfrom great_expectations.expectations.metrics.column_aggregate_metric import sa as sa\nfrom great_expectations.expectations.metrics.metric_provider import metric_value\nfrom great_expectations.validator.validation_graph import MetricConfiguration\n\n\ndef unique_proportion(_metrics):\n    total_values = _metrics.get(\"table.row_count\")\n    unique_values = _metrics.get(\"column.distinct_values.count\")\n    null_count = _metrics.get(\"column_values.nonnull.unexpected_count\")\n\n    if total_values > 0:\n        return unique_values / (total_values - null_count)\n    else:\n        return 0\n\n\nclass ColumnUniqueProportion(ColumnMetricProvider):\n    metric_name = \"column.unique_proportion\"\n\n    @metric_value(engine=PandasExecutionEngine)\n    def _pandas(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @metric_value(engine=SqlAlchemyExecutionEngine)\n    def _sqlalchemy(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @metric_value(engine=SparkDFExecutionEngine)\n    def _spark(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @classmethod\n    def _get_evaluation_dependencies(\n        cls,\n        metric: MetricConfiguration,\n        configuration: Optional[ExpectationConfiguration] = None,\n        execution_engine: Optional[ExecutionEngine] = None,\n        runtime_configuration: Optional[dict] = None,\n    ):\n        table_domain_kwargs = {\n            k: v for k, v in metric.metric_domain_kwargs.items() if k != \"column\"\n        }\n        return {\n            \"column.distinct_values.count\": MetricConfiguration(\n                \"column.distinct_values.count\", metric.metric_domain_kwargs\n            ),\n            \"table.row_count\": MetricConfiguration(\n                \"table.row_count\", table_domain_kwargs\n            ),\n            \"column_values.nonnull.unexpected_count\": MetricConfiguration(\n                \"column_values.nonnull.unexpected_count\", metric.metric_domain_kwargs\n            ),\n        }\n", "path": "great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py"}], "after_files": [{"content": "from typing import Optional\n\nfrom great_expectations.core import ExpectationConfiguration\nfrom great_expectations.execution_engine import (\n    ExecutionEngine,\n    PandasExecutionEngine,\n    SparkDFExecutionEngine,\n)\nfrom great_expectations.execution_engine.sqlalchemy_execution_engine import (\n    SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.column_aggregate_metric import (\n    ColumnMetricProvider,\n    column_aggregate_partial,\n    column_aggregate_value,\n)\nfrom great_expectations.expectations.metrics.column_aggregate_metric import sa as sa\nfrom great_expectations.expectations.metrics.metric_provider import metric_value\nfrom great_expectations.validator.validation_graph import MetricConfiguration\n\n\ndef unique_proportion(_metrics):\n    \"\"\"Computes the proportion of unique non-null values out of all non-null values\"\"\"\n    total_values = _metrics.get(\"table.row_count\")\n    unique_values = _metrics.get(\"column.distinct_values.count\")\n    null_count = _metrics.get(\"column_values.nonnull.unexpected_count\")\n\n    # Ensuring that we do not divide by 0, returning 0 if all values are nulls (we only consider non-nulls unique values)\n    if total_values > 0 and total_values != null_count:\n        return unique_values / (total_values - null_count)\n    else:\n        return 0\n\n\nclass ColumnUniqueProportion(ColumnMetricProvider):\n    metric_name = \"column.unique_proportion\"\n\n    @metric_value(engine=PandasExecutionEngine)\n    def _pandas(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @metric_value(engine=SqlAlchemyExecutionEngine)\n    def _sqlalchemy(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @metric_value(engine=SparkDFExecutionEngine)\n    def _spark(*args, metrics, **kwargs):\n        return unique_proportion(metrics)\n\n    @classmethod\n    def _get_evaluation_dependencies(\n        cls,\n        metric: MetricConfiguration,\n        configuration: Optional[ExpectationConfiguration] = None,\n        execution_engine: Optional[ExecutionEngine] = None,\n        runtime_configuration: Optional[dict] = None,\n    ):\n        table_domain_kwargs = {\n            k: v for k, v in metric.metric_domain_kwargs.items() if k != \"column\"\n        }\n        return {\n            \"column.distinct_values.count\": MetricConfiguration(\n                \"column.distinct_values.count\", metric.metric_domain_kwargs\n            ),\n            \"table.row_count\": MetricConfiguration(\n                \"table.row_count\", table_domain_kwargs\n            ),\n            \"column_values.nonnull.unexpected_count\": MetricConfiguration(\n                \"column_values.nonnull.unexpected_count\", metric.metric_domain_kwargs\n            ),\n        }\n", "path": "great_expectations/expectations/metrics/column_aggregate_metrics/column_proportion_of_unique_values.py"}]}