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/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py`
Content:
```
1 from typing import Any, Dict, List, Optional, Tuple, Union
2 
3 import numpy as np
4 
5 from great_expectations.core.batch import Batch, BatchRequest, RuntimeBatchRequest
6 from great_expectations.rule_based_profiler.helpers.util import (
7     get_parameter_value_and_validate_return_type,
8 )
9 from great_expectations.rule_based_profiler.parameter_builder import (
10     MetricMultiBatchParameterBuilder,
11 )
12 from great_expectations.rule_based_profiler.parameter_builder.parameter_builder import (
13     MetricValues,
14 )
15 from great_expectations.rule_based_profiler.types import (
16     Domain,
17     ParameterContainer,
18     ParameterNode,
19 )
20 
21 
22 class MeanUnexpectedMapMetricMultiBatchParameterBuilder(
23     MetricMultiBatchParameterBuilder
24 ):
25     """
26     Compute mean unexpected count ratio (as a fraction) of a specified map-style metric across all specified batches.
27     """
28 
29     def __init__(
30         self,
31         name: str,
32         map_metric_name: str,
33         total_count_parameter_builder_name: str,
34         null_count_parameter_builder_name: Optional[str] = None,
35         metric_domain_kwargs: Optional[Union[str, dict]] = None,
36         metric_value_kwargs: Optional[Union[str, dict]] = None,
37         batch_list: Optional[List[Batch]] = None,
38         batch_request: Optional[Union[BatchRequest, RuntimeBatchRequest, dict]] = None,
39         json_serialize: Union[str, bool] = True,
40         data_context: Optional["DataContext"] = None,  # noqa: F821
41     ):
42         """
43         Args:
44             name: the name of this parameter -- this is user-specified parameter name (from configuration);
45             it is not the fully-qualified parameter name; a fully-qualified parameter name must start with "$parameter."
46             and may contain one or more subsequent parts (e.g., "$parameter.<my_param_from_config>.<metric_name>").
47             map_metric_name: the name of a map metric (must be a supported and registered map metric); the suffix
48             ".unexpected_count" will be appended to "map_metric_name" to be used in MetricConfiguration to get values.
49             total_count_parameter_builder_name: name of parameter that computes total_count (of rows in Batch).
50             null_count_parameter_builder_name: name of parameter that computes null_count (of domain values in Batch).
51             metric_domain_kwargs: used in MetricConfiguration
52             metric_value_kwargs: used in MetricConfiguration
53             batch_list: explicitly passed Batch objects for parameter computation (take precedence over batch_request).
54             batch_request: specified in ParameterBuilder configuration to get Batch objects for parameter computation.
55             json_serialize: If True (default), convert computed value to JSON prior to saving results.
56             data_context: DataContext
57         """
58         super().__init__(
59             name=name,
60             metric_name=f"{map_metric_name}.unexpected_count",
61             metric_domain_kwargs=metric_domain_kwargs,
62             metric_value_kwargs=metric_value_kwargs,
63             enforce_numeric_metric=True,
64             replace_nan_with_zero=True,
65             reduce_scalar_metric=True,
66             batch_list=batch_list,
67             batch_request=batch_request,
68             json_serialize=json_serialize,
69             data_context=data_context,
70         )
71 
72         self._map_metric_name = map_metric_name
73         self._total_count_parameter_builder_name = total_count_parameter_builder_name
74         self._null_count_parameter_builder_name = null_count_parameter_builder_name
75 
76     @property
77     def map_metric_name(self) -> str:
78         return self._map_metric_name
79 
80     @property
81     def total_count_parameter_builder_name(self) -> str:
82         return self._total_count_parameter_builder_name
83 
84     @property
85     def null_count_parameter_builder_name(self) -> Optional[str]:
86         return self._null_count_parameter_builder_name
87 
88     def _build_parameters(
89         self,
90         parameter_container: ParameterContainer,
91         domain: Domain,
92         variables: Optional[ParameterContainer] = None,
93         parameters: Optional[Dict[str, ParameterContainer]] = None,
94     ) -> Tuple[Any, dict]:
95         """
96         Builds ParameterContainer object that holds ParameterNode objects with attribute name-value pairs and optional
97         details.
98 
99         return: Tuple containing computed_parameter_value and parameter_computation_details metadata.
100         """
101         # Obtain total_count_parameter_builder_name from "rule state" (i.e., variables and parameters); from instance variable otherwise.
102         total_count_parameter_builder_name: str = (
103             get_parameter_value_and_validate_return_type(
104                 domain=domain,
105                 parameter_reference=self.total_count_parameter_builder_name,
106                 expected_return_type=str,
107                 variables=variables,
108                 parameters=parameters,
109             )
110         )
111 
112         fully_qualified_total_count_parameter_builder_name: str = (
113             f"$parameter.{total_count_parameter_builder_name}"
114         )
115         # Obtain total_count from "rule state" (i.e., variables and parameters); from instance variable otherwise.
116         total_count_parameter_node: ParameterNode = (
117             get_parameter_value_and_validate_return_type(
118                 domain=domain,
119                 parameter_reference=fully_qualified_total_count_parameter_builder_name,
120                 expected_return_type=None,
121                 variables=variables,
122                 parameters=parameters,
123             )
124         )
125         total_count_values: MetricValues = total_count_parameter_node.value
126 
127         # Obtain null_count_parameter_builder_name from "rule state" (i.e., variables and parameters); from instance variable otherwise.
128         null_count_parameter_builder_name: str = (
129             get_parameter_value_and_validate_return_type(
130                 domain=domain,
131                 parameter_reference=self.null_count_parameter_builder_name,
132                 expected_return_type=str,
133                 variables=variables,
134                 parameters=parameters,
135             )
136         )
137 
138         batch_ids: Optional[List[str]] = self.get_batch_ids(
139             domain=domain,
140             variables=variables,
141             parameters=parameters,
142         )
143         num_batch_ids: int = len(batch_ids)
144 
145         null_count_values: MetricValues
146         if null_count_parameter_builder_name is None:
147             null_count_values = np.zeros(shape=(num_batch_ids,))
148         else:
149             fully_qualified_null_count_parameter_builder_name: str = (
150                 f"$parameter.{null_count_parameter_builder_name}"
151             )
152             # Obtain null_count from "rule state" (i.e., variables and parameters); from instance variable otherwise.
153             null_count_parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(
154                 domain=domain,
155                 parameter_reference=fully_qualified_null_count_parameter_builder_name,
156                 expected_return_type=None,
157                 variables=variables,
158                 parameters=parameters,
159             )
160             null_count_values = null_count_parameter_node.value
161 
162         nonnull_count_values: np.ndarray = total_count_values - null_count_values
163 
164         # Compute "unexpected_count" corresponding to "map_metric_name" (given as argument to this "ParameterBuilder").
165         super().build_parameters(
166             parameter_container=parameter_container,
167             domain=domain,
168             variables=variables,
169             parameters=parameters,
170             parameter_computation_impl=super()._build_parameters,
171         )
172 
173         # Retrieve "unexpected_count" corresponding to "map_metric_name" (given as argument to this "ParameterBuilder").
174         parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(
175             domain=domain,
176             parameter_reference=self.fully_qualified_parameter_name,
177             expected_return_type=None,
178             variables=variables,
179             parameters=parameters,
180         )
181         unexpected_count_values: MetricValues = parameter_node.value
182 
183         unexpected_count_ratio_values: np.ndarray = (
184             unexpected_count_values / nonnull_count_values
185         )
186         mean_unexpected_count_ratio: np.float64 = np.mean(unexpected_count_ratio_values)
187 
188         return (
189             mean_unexpected_count_ratio,
190             parameter_node.details,
191         )
192
```
--- 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/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py
--- a/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py
+++ b/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py
@@ -1,4 +1,4 @@
-from typing import Any, Dict, List, Optional, Tuple, Union
+from typing import Any, Dict, List, Optional, Set, Tuple, Union
 
 import numpy as np
 
@@ -26,6 +26,15 @@
     Compute mean unexpected count ratio (as a fraction) of a specified map-style metric across all specified batches.
     """
 
+    exclude_field_names: Set[
+        str
+    ] = MetricMultiBatchParameterBuilder.exclude_field_names | {
+        "metric_name",
+        "enforce_numeric_metric",
+        "replace_nan_with_zero",
+        "reduce_scalar_metric",
+    }
+
     def __init__(
         self,
         name: str,

{"golden_diff": "diff --git a/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py b/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py\n--- a/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py\n+++ b/great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py\n@@ -1,4 +1,4 @@\n-from typing import Any, Dict, List, Optional, Tuple, Union\n+from typing import Any, Dict, List, Optional, Set, Tuple, Union\n \n import numpy as np\n \n@@ -26,6 +26,15 @@\n     Compute mean unexpected count ratio (as a fraction) of a specified map-style metric across all specified batches.\n     \"\"\"\n \n+    exclude_field_names: Set[\n+        str\n+    ] = MetricMultiBatchParameterBuilder.exclude_field_names | {\n+        \"metric_name\",\n+        \"enforce_numeric_metric\",\n+        \"replace_nan_with_zero\",\n+        \"reduce_scalar_metric\",\n+    }\n+\n     def __init__(\n         self,\n         name: str,\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 Any, Dict, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom great_expectations.core.batch import Batch, BatchRequest, RuntimeBatchRequest\nfrom great_expectations.rule_based_profiler.helpers.util import (\n    get_parameter_value_and_validate_return_type,\n)\nfrom great_expectations.rule_based_profiler.parameter_builder import (\n    MetricMultiBatchParameterBuilder,\n)\nfrom great_expectations.rule_based_profiler.parameter_builder.parameter_builder import (\n    MetricValues,\n)\nfrom great_expectations.rule_based_profiler.types import (\n    Domain,\n    ParameterContainer,\n    ParameterNode,\n)\n\n\nclass MeanUnexpectedMapMetricMultiBatchParameterBuilder(\n    MetricMultiBatchParameterBuilder\n):\n    \"\"\"\n    Compute mean unexpected count ratio (as a fraction) of a specified map-style metric across all specified batches.\n    \"\"\"\n\n    def __init__(\n        self,\n        name: str,\n        map_metric_name: str,\n        total_count_parameter_builder_name: str,\n        null_count_parameter_builder_name: Optional[str] = None,\n        metric_domain_kwargs: Optional[Union[str, dict]] = None,\n        metric_value_kwargs: Optional[Union[str, dict]] = None,\n        batch_list: Optional[List[Batch]] = None,\n        batch_request: Optional[Union[BatchRequest, RuntimeBatchRequest, dict]] = None,\n        json_serialize: Union[str, bool] = True,\n        data_context: Optional[\"DataContext\"] = None,  # noqa: F821\n    ):\n        \"\"\"\n        Args:\n            name: the name of this parameter -- this is user-specified parameter name (from configuration);\n            it is not the fully-qualified parameter name; a fully-qualified parameter name must start with \"$parameter.\"\n            and may contain one or more subsequent parts (e.g., \"$parameter.<my_param_from_config>.<metric_name>\").\n            map_metric_name: the name of a map metric (must be a supported and registered map metric); the suffix\n            \".unexpected_count\" will be appended to \"map_metric_name\" to be used in MetricConfiguration to get values.\n            total_count_parameter_builder_name: name of parameter that computes total_count (of rows in Batch).\n            null_count_parameter_builder_name: name of parameter that computes null_count (of domain values in Batch).\n            metric_domain_kwargs: used in MetricConfiguration\n            metric_value_kwargs: used in MetricConfiguration\n            batch_list: explicitly passed Batch objects for parameter computation (take precedence over batch_request).\n            batch_request: specified in ParameterBuilder configuration to get Batch objects for parameter computation.\n            json_serialize: If True (default), convert computed value to JSON prior to saving results.\n            data_context: DataContext\n        \"\"\"\n        super().__init__(\n            name=name,\n            metric_name=f\"{map_metric_name}.unexpected_count\",\n            metric_domain_kwargs=metric_domain_kwargs,\n            metric_value_kwargs=metric_value_kwargs,\n            enforce_numeric_metric=True,\n            replace_nan_with_zero=True,\n            reduce_scalar_metric=True,\n            batch_list=batch_list,\n            batch_request=batch_request,\n            json_serialize=json_serialize,\n            data_context=data_context,\n        )\n\n        self._map_metric_name = map_metric_name\n        self._total_count_parameter_builder_name = total_count_parameter_builder_name\n        self._null_count_parameter_builder_name = null_count_parameter_builder_name\n\n    @property\n    def map_metric_name(self) -> str:\n        return self._map_metric_name\n\n    @property\n    def total_count_parameter_builder_name(self) -> str:\n        return self._total_count_parameter_builder_name\n\n    @property\n    def null_count_parameter_builder_name(self) -> Optional[str]:\n        return self._null_count_parameter_builder_name\n\n    def _build_parameters(\n        self,\n        parameter_container: ParameterContainer,\n        domain: Domain,\n        variables: Optional[ParameterContainer] = None,\n        parameters: Optional[Dict[str, ParameterContainer]] = None,\n    ) -> Tuple[Any, dict]:\n        \"\"\"\n        Builds ParameterContainer object that holds ParameterNode objects with attribute name-value pairs and optional\n        details.\n\n        return: Tuple containing computed_parameter_value and parameter_computation_details metadata.\n        \"\"\"\n        # Obtain total_count_parameter_builder_name from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        total_count_parameter_builder_name: str = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=self.total_count_parameter_builder_name,\n                expected_return_type=str,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n\n        fully_qualified_total_count_parameter_builder_name: str = (\n            f\"$parameter.{total_count_parameter_builder_name}\"\n        )\n        # Obtain total_count from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        total_count_parameter_node: ParameterNode = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=fully_qualified_total_count_parameter_builder_name,\n                expected_return_type=None,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n        total_count_values: MetricValues = total_count_parameter_node.value\n\n        # Obtain null_count_parameter_builder_name from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        null_count_parameter_builder_name: str = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=self.null_count_parameter_builder_name,\n                expected_return_type=str,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n\n        batch_ids: Optional[List[str]] = self.get_batch_ids(\n            domain=domain,\n            variables=variables,\n            parameters=parameters,\n        )\n        num_batch_ids: int = len(batch_ids)\n\n        null_count_values: MetricValues\n        if null_count_parameter_builder_name is None:\n            null_count_values = np.zeros(shape=(num_batch_ids,))\n        else:\n            fully_qualified_null_count_parameter_builder_name: str = (\n                f\"$parameter.{null_count_parameter_builder_name}\"\n            )\n            # Obtain null_count from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n            null_count_parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=fully_qualified_null_count_parameter_builder_name,\n                expected_return_type=None,\n                variables=variables,\n                parameters=parameters,\n            )\n            null_count_values = null_count_parameter_node.value\n\n        nonnull_count_values: np.ndarray = total_count_values - null_count_values\n\n        # Compute \"unexpected_count\" corresponding to \"map_metric_name\" (given as argument to this \"ParameterBuilder\").\n        super().build_parameters(\n            parameter_container=parameter_container,\n            domain=domain,\n            variables=variables,\n            parameters=parameters,\n            parameter_computation_impl=super()._build_parameters,\n        )\n\n        # Retrieve \"unexpected_count\" corresponding to \"map_metric_name\" (given as argument to this \"ParameterBuilder\").\n        parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(\n            domain=domain,\n            parameter_reference=self.fully_qualified_parameter_name,\n            expected_return_type=None,\n            variables=variables,\n            parameters=parameters,\n        )\n        unexpected_count_values: MetricValues = parameter_node.value\n\n        unexpected_count_ratio_values: np.ndarray = (\n            unexpected_count_values / nonnull_count_values\n        )\n        mean_unexpected_count_ratio: np.float64 = np.mean(unexpected_count_ratio_values)\n\n        return (\n            mean_unexpected_count_ratio,\n            parameter_node.details,\n        )\n", "path": "great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py"}], "after_files": [{"content": "from typing import Any, Dict, List, Optional, Set, Tuple, Union\n\nimport numpy as np\n\nfrom great_expectations.core.batch import Batch, BatchRequest, RuntimeBatchRequest\nfrom great_expectations.rule_based_profiler.helpers.util import (\n    get_parameter_value_and_validate_return_type,\n)\nfrom great_expectations.rule_based_profiler.parameter_builder import (\n    MetricMultiBatchParameterBuilder,\n)\nfrom great_expectations.rule_based_profiler.parameter_builder.parameter_builder import (\n    MetricValues,\n)\nfrom great_expectations.rule_based_profiler.types import (\n    Domain,\n    ParameterContainer,\n    ParameterNode,\n)\n\n\nclass MeanUnexpectedMapMetricMultiBatchParameterBuilder(\n    MetricMultiBatchParameterBuilder\n):\n    \"\"\"\n    Compute mean unexpected count ratio (as a fraction) of a specified map-style metric across all specified batches.\n    \"\"\"\n\n    exclude_field_names: Set[\n        str\n    ] = MetricMultiBatchParameterBuilder.exclude_field_names | {\n        \"metric_name\",\n        \"enforce_numeric_metric\",\n        \"replace_nan_with_zero\",\n        \"reduce_scalar_metric\",\n    }\n\n    def __init__(\n        self,\n        name: str,\n        map_metric_name: str,\n        total_count_parameter_builder_name: str,\n        null_count_parameter_builder_name: Optional[str] = None,\n        metric_domain_kwargs: Optional[Union[str, dict]] = None,\n        metric_value_kwargs: Optional[Union[str, dict]] = None,\n        batch_list: Optional[List[Batch]] = None,\n        batch_request: Optional[Union[BatchRequest, RuntimeBatchRequest, dict]] = None,\n        json_serialize: Union[str, bool] = True,\n        data_context: Optional[\"DataContext\"] = None,  # noqa: F821\n    ):\n        \"\"\"\n        Args:\n            name: the name of this parameter -- this is user-specified parameter name (from configuration);\n            it is not the fully-qualified parameter name; a fully-qualified parameter name must start with \"$parameter.\"\n            and may contain one or more subsequent parts (e.g., \"$parameter.<my_param_from_config>.<metric_name>\").\n            map_metric_name: the name of a map metric (must be a supported and registered map metric); the suffix\n            \".unexpected_count\" will be appended to \"map_metric_name\" to be used in MetricConfiguration to get values.\n            total_count_parameter_builder_name: name of parameter that computes total_count (of rows in Batch).\n            null_count_parameter_builder_name: name of parameter that computes null_count (of domain values in Batch).\n            metric_domain_kwargs: used in MetricConfiguration\n            metric_value_kwargs: used in MetricConfiguration\n            batch_list: explicitly passed Batch objects for parameter computation (take precedence over batch_request).\n            batch_request: specified in ParameterBuilder configuration to get Batch objects for parameter computation.\n            json_serialize: If True (default), convert computed value to JSON prior to saving results.\n            data_context: DataContext\n        \"\"\"\n        super().__init__(\n            name=name,\n            metric_name=f\"{map_metric_name}.unexpected_count\",\n            metric_domain_kwargs=metric_domain_kwargs,\n            metric_value_kwargs=metric_value_kwargs,\n            enforce_numeric_metric=True,\n            replace_nan_with_zero=True,\n            reduce_scalar_metric=True,\n            batch_list=batch_list,\n            batch_request=batch_request,\n            json_serialize=json_serialize,\n            data_context=data_context,\n        )\n\n        self._map_metric_name = map_metric_name\n        self._total_count_parameter_builder_name = total_count_parameter_builder_name\n        self._null_count_parameter_builder_name = null_count_parameter_builder_name\n\n    @property\n    def map_metric_name(self) -> str:\n        return self._map_metric_name\n\n    @property\n    def total_count_parameter_builder_name(self) -> str:\n        return self._total_count_parameter_builder_name\n\n    @property\n    def null_count_parameter_builder_name(self) -> Optional[str]:\n        return self._null_count_parameter_builder_name\n\n    def _build_parameters(\n        self,\n        parameter_container: ParameterContainer,\n        domain: Domain,\n        variables: Optional[ParameterContainer] = None,\n        parameters: Optional[Dict[str, ParameterContainer]] = None,\n    ) -> Tuple[Any, dict]:\n        \"\"\"\n        Builds ParameterContainer object that holds ParameterNode objects with attribute name-value pairs and optional\n        details.\n\n        return: Tuple containing computed_parameter_value and parameter_computation_details metadata.\n        \"\"\"\n        # Obtain total_count_parameter_builder_name from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        total_count_parameter_builder_name: str = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=self.total_count_parameter_builder_name,\n                expected_return_type=str,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n\n        fully_qualified_total_count_parameter_builder_name: str = (\n            f\"$parameter.{total_count_parameter_builder_name}\"\n        )\n        # Obtain total_count from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        total_count_parameter_node: ParameterNode = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=fully_qualified_total_count_parameter_builder_name,\n                expected_return_type=None,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n        total_count_values: MetricValues = total_count_parameter_node.value\n\n        # Obtain null_count_parameter_builder_name from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n        null_count_parameter_builder_name: str = (\n            get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=self.null_count_parameter_builder_name,\n                expected_return_type=str,\n                variables=variables,\n                parameters=parameters,\n            )\n        )\n\n        batch_ids: Optional[List[str]] = self.get_batch_ids(\n            domain=domain,\n            variables=variables,\n            parameters=parameters,\n        )\n        num_batch_ids: int = len(batch_ids)\n\n        null_count_values: MetricValues\n        if null_count_parameter_builder_name is None:\n            null_count_values = np.zeros(shape=(num_batch_ids,))\n        else:\n            fully_qualified_null_count_parameter_builder_name: str = (\n                f\"$parameter.{null_count_parameter_builder_name}\"\n            )\n            # Obtain null_count from \"rule state\" (i.e., variables and parameters); from instance variable otherwise.\n            null_count_parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(\n                domain=domain,\n                parameter_reference=fully_qualified_null_count_parameter_builder_name,\n                expected_return_type=None,\n                variables=variables,\n                parameters=parameters,\n            )\n            null_count_values = null_count_parameter_node.value\n\n        nonnull_count_values: np.ndarray = total_count_values - null_count_values\n\n        # Compute \"unexpected_count\" corresponding to \"map_metric_name\" (given as argument to this \"ParameterBuilder\").\n        super().build_parameters(\n            parameter_container=parameter_container,\n            domain=domain,\n            variables=variables,\n            parameters=parameters,\n            parameter_computation_impl=super()._build_parameters,\n        )\n\n        # Retrieve \"unexpected_count\" corresponding to \"map_metric_name\" (given as argument to this \"ParameterBuilder\").\n        parameter_node: ParameterNode = get_parameter_value_and_validate_return_type(\n            domain=domain,\n            parameter_reference=self.fully_qualified_parameter_name,\n            expected_return_type=None,\n            variables=variables,\n            parameters=parameters,\n        )\n        unexpected_count_values: MetricValues = parameter_node.value\n\n        unexpected_count_ratio_values: np.ndarray = (\n            unexpected_count_values / nonnull_count_values\n        )\n        mean_unexpected_count_ratio: np.float64 = np.mean(unexpected_count_ratio_values)\n\n        return (\n            mean_unexpected_count_ratio,\n            parameter_node.details,\n        )\n", "path": "great_expectations/rule_based_profiler/parameter_builder/mean_unexpected_map_metric_multi_batch_parameter_builder.py"}]}