prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Use cleaner solution for non-truncating division in python 2
  Prefer `from __future__ import division` to `1.*x/y`
  
  </issue>
  <code>
  [start of examples/expectations/regex_based_column_map_expectation_template.py]
  1 """
  2 This is a template for creating custom RegexBasedColumnMapExpectations.
  3 For detailed instructions on how to use it, please see:
  4     https://docs.greatexpectations.io/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations
  5 """
  6 
  7 from typing import Dict, Optional
  8 
  9 from great_expectations.core.expectation_configuration import ExpectationConfiguration
  10 from great_expectations.exceptions.exceptions import (
  11     InvalidExpectationConfigurationError,
  12 )
  13 from great_expectations.expectations.regex_based_column_map_expectation import (
  14     RegexBasedColumnMapExpectation,
  15     RegexColumnMapMetricProvider,
  16 )
  17 
  18 
  19 # <snippet>
  20 # This class defines the Expectation itself
  21 class ExpectColumnValuesToMatchSomeRegex(RegexBasedColumnMapExpectation):
  22     """TODO: Add a docstring here"""
  23 
  24     # These values will be used to configure the metric created by your expectation
  25     regex_snake_name = "regex_name"
  26     regex_camel_name = "RegexName"
  27     regex = "regex pattern"
  28     semantic_type_name_plural = None
  29 
  30     # These examples will be shown in the public gallery.
  31     # They will also be executed as unit tests for your Expectation.
  32     examples = []
  33 
  34     def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):
  35         """
  36         Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
  37         necessary configuration arguments have been provided for the validation of the expectation.
  38 
  39         Args:
  40             configuration (OPTIONAL[ExpectationConfiguration]): \
  41                 An optional Expectation Configuration entry that will be used to configure the expectation
  42         Returns:
  43             True if the configuration has been validated successfully. Otherwise, raises an exception
  44         """
  45 
  46         super().validate_configuration(configuration)
  47         if configuration is None:
  48             configuration = self.configuration
  49 
  50         # # Check other things in configuration.kwargs and raise Exceptions if needed
  51         # try:
  52         #     assert (
  53         #         ...
  54         #     ), "message"
  55         #     assert (
  56         #         ...
  57         #     ), "message"
  58         # except AssertionError as e:
  59         #     raise InvalidExpectationConfigurationError(str(e))
  60 
  61         return True
  62 
  63     # Here your regex is used to create a custom metric for this expectation
  64     map_metric = RegexBasedColumnMapExpectation.register_metric(
  65         regex_snake_name=regex_snake_name,
  66         regex_camel_name=regex_camel_name,
  67         regex_=regex,
  68     )
  69 
  70     # This object contains metadata for display in the public Gallery
  71     library_metadata = {
  72         "tags": [],  # Tags for this Expectation in the Gallery
  73         "contributors": [  # Github handles for all contributors to this Expectation.
  74             "@your_name_here",  # Don't forget to add your github handle here!
  75         ],
  76     }
  77 
  78 
  79 # </snippet>
  80 if __name__ == "__main__":
  81     ExpectColumnValuesToMatchSomeRegex().print_diagnostic_checklist()
  82
  [end of examples/expectations/regex_based_column_map_expectation_template.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/expectations/regex_based_column_map_expectation_template.py b/examples/expectations/regex_based_column_map_expectation_template.py
  --- a/examples/expectations/regex_based_column_map_expectation_template.py
  +++ b/examples/expectations/regex_based_column_map_expectation_template.py
  @@ -31,35 +31,6 @@
       # They will also be executed as unit tests for your Expectation.
       examples = []
   
  -    def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):
  -        """
  -        Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
  -        necessary configuration arguments have been provided for the validation of the expectation.
  -
  -        Args:
  -            configuration (OPTIONAL[ExpectationConfiguration]): \
  -                An optional Expectation Configuration entry that will be used to configure the expectation
  -        Returns:
  -            True if the configuration has been validated successfully. Otherwise, raises an exception
  -        """
  -
  -        super().validate_configuration(configuration)
  -        if configuration is None:
  -            configuration = self.configuration
  -
  -        # # Check other things in configuration.kwargs and raise Exceptions if needed
  -        # try:
  -        #     assert (
  -        #         ...
  -        #     ), "message"
  -        #     assert (
  -        #         ...
  -        #     ), "message"
  -        # except AssertionError as e:
  -        #     raise InvalidExpectationConfigurationError(str(e))
  -
  -        return True
  -
       # Here your regex is used to create a custom metric for this expectation
       map_metric = RegexBasedColumnMapExpectation.register_metric(
           regex_snake_name=regex_snake_name,
  
verification_info: {"golden_diff": "diff --git a/examples/expectations/regex_based_column_map_expectation_template.py b/examples/expectations/regex_based_column_map_expectation_template.py\n--- a/examples/expectations/regex_based_column_map_expectation_template.py\n+++ b/examples/expectations/regex_based_column_map_expectation_template.py\n@@ -31,35 +31,6 @@\n     # They will also be executed as unit tests for your Expectation.\n     examples = []\n \n-    def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):\n-        \"\"\"\n-        Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that\n-        necessary configuration arguments have been provided for the validation of the expectation.\n-\n-        Args:\n-            configuration (OPTIONAL[ExpectationConfiguration]): \\\n-                An optional Expectation Configuration entry that will be used to configure the expectation\n-        Returns:\n-            True if the configuration has been validated successfully. Otherwise, raises an exception\n-        \"\"\"\n-\n-        super().validate_configuration(configuration)\n-        if configuration is None:\n-            configuration = self.configuration\n-\n-        # # Check other things in configuration.kwargs and raise Exceptions if needed\n-        # try:\n-        #     assert (\n-        #         ...\n-        #     ), \"message\"\n-        #     assert (\n-        #         ...\n-        #     ), \"message\"\n-        # except AssertionError as e:\n-        #     raise InvalidExpectationConfigurationError(str(e))\n-\n-        return True\n-\n     # Here your regex is used to create a custom metric for this expectation\n     map_metric = RegexBasedColumnMapExpectation.register_metric(\n         regex_snake_name=regex_snake_name,\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": "\"\"\"\nThis is a template for creating custom RegexBasedColumnMapExpectations.\nFor detailed instructions on how to use it, please see:\n    https://docs.greatexpectations.io/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_regex_based_column_map_expectations\n\"\"\"\n\nfrom typing import Dict, Optional\n\nfrom great_expectations.core.expectation_configuration import ExpectationConfiguration\nfrom great_expectations.exceptions.exceptions import (\n    InvalidExpectationConfigurationError,\n)\nfrom great_expectations.expectations.regex_based_column_map_expectation import (\n    RegexBasedColumnMapExpectation,\n    RegexColumnMapMetricProvider,\n)\n\n\n# <snippet>\n# This class defines the Expectation itself\nclass ExpectColumnValuesToMatchSomeRegex(RegexBasedColumnMapExpectation):\n    \"\"\"TODO: Add a docstring here\"\"\"\n\n    # These values will be used to configure the metric created by your expectation\n    regex_snake_name = \"regex_name\"\n    regex_camel_name = \"RegexName\"\n    regex = \"regex pattern\"\n    semantic_type_name_plural = None\n\n    # These examples will be shown in the public gallery.\n    # They will also be executed as unit tests for your Expectation.\n    examples = []\n\n    def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):\n        \"\"\"\n        Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that\n        necessary configuration arguments have been provided for the validation of the expectation.\n\n        Args:\n            configuration (OPTIONAL[ExpectationConfiguration]): \\\n                An optional Expectation Configuration entry that will be used to configure the expectation\n        Returns:\n            True if the configuration has been validated successfully. Otherwise, raises an exception\n        \"\"\"\n\n        super().validate_configuration(configuration)\n        if configuration is None:\n            configuration = self.configuration\n\n        # # Check other things in configuration.kwargs and raise Exceptions if needed\n        # try:\n        #     assert (\n        #         ...\n        #     ), \"message\"\n        #     assert (\n        #         ...\n        #     ), \"message\"\n        # except AssertionError as e:\n        #     raise InvalidExpectationConfigurationError(str(e))\n\n        return True\n\n    # Here your regex is used to create a custom metric for this expectation\n    map_metric = RegexBasedColumnMapExpectation.register_metric(\n        regex_snake_name=regex_snake_name,\n        regex_camel_name=regex_camel_name,\n        regex_=regex,\n    )\n\n    # This object contains metadata for display in the public Gallery\n    library_metadata = {\n        \"tags\": [],  # Tags for this Expectation in the Gallery\n        \"contributors\": [  # Github handles for all contributors to this Expectation.\n            \"@your_name_here\",  # Don't forget to add your github handle here!\n        ],\n    }\n\n\n# </snippet>\nif __name__ == \"__main__\":\n    ExpectColumnValuesToMatchSomeRegex().print_diagnostic_checklist()\n", "path": "examples/expectations/regex_based_column_map_expectation_template.py"}]}