prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Feat(curation notebooks): display the x-request-id in the error response
  When an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value visible to the users will help developer trouble shoot errors seen by the users in the future.
  
  </issue>
  <code>
  [start of notebooks/curation_api/python/src/utils/logger.py]
  1 import logging
  2 import os
  3 import sys
  4 
  5 
  6 def set_log_level(log_level: str):
  7     """
  8     :param log_level: the logging level ("NOTSET", "DEBUG", "INFO", "WARN", "ERROR", "FATAL")
  9     """
  10     all_levels = logging._nameToLevel.keys()
  11     if log_level not in all_levels:
  12         raise Exception(f"The log_level arg must be one of {list(all_levels)}")
  13     os.environ["LOG_LEVEL"] = log_level
  14     logger = logging.getLogger()
  15     logger.setLevel(log_level)
  16     for h in logger.handlers:
  17         h.setLevel(log_level)
  18     print(f"Set logging level to {log_level}")
  19 
  20 
  21 def get_custom_logger() -> logging.Logger:
  22     """
  23     Get a custom logger that will still print to stdout in notebooks.
  24     :return: the logger object
  25     """
  26     log_level = os.getenv("LOG_LEVEL", "INFO")
  27     logging.basicConfig(level=log_level)
  28     logger = logging.getLogger()
  29     logger.removeHandler(logger.handlers[0])
  30     ch = logging.StreamHandler(stream=sys.stdout)
  31     ch.setLevel(level=log_level)
  32     level_printout = f"{'%(levelname)s:' if logger.level in ('WARN', 'ERROR') else ''}"
  33     formatter = logging.Formatter(f"{level_printout}%(message)s")
  34     ch.setFormatter(formatter)
  35     logger.addHandler(ch)
  36     return logger
  37 
  38 
  39 def failure(logger: logging.Logger, e, *messages):
  40     logger.error("\n\033[1m\033[38;5;9mFAILED\033[0m\n")  # 'FAILED' in bold red
  41     logger.error(e.response.reason + "\n")
  42     logger.error(e.response.text + "\n")
  43     if messages:
  44         [logger.error(m) for m in messages]
  45 
  46 
  47 def success(logger: logging.Logger, *messages):
  48     logger.info("\n\033[1m\033[38;5;10mSUCCESS\033[0m\n")  # 'SUCCESS' in bold green
  49     if messages:
  50         [logger.info(m) for m in messages]
  51
  [end of notebooks/curation_api/python/src/utils/logger.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/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py
  --- a/notebooks/curation_api/python/src/utils/logger.py
  +++ b/notebooks/curation_api/python/src/utils/logger.py
  @@ -40,6 +40,8 @@
       logger.error("\n\033[1m\033[38;5;9mFAILED\033[0m\n")  # 'FAILED' in bold red
       logger.error(e.response.reason + "\n")
       logger.error(e.response.text + "\n")
  +    logger.error(f"x-request-id: {e.response.headers.get('x-request-id')}")
  +
       if messages:
           [logger.error(m) for m in messages]
  
verification_info: {"golden_diff": "diff --git a/notebooks/curation_api/python/src/utils/logger.py b/notebooks/curation_api/python/src/utils/logger.py\n--- a/notebooks/curation_api/python/src/utils/logger.py\n+++ b/notebooks/curation_api/python/src/utils/logger.py\n@@ -40,6 +40,8 @@\n     logger.error(\"\\n\\033[1m\\033[38;5;9mFAILED\\033[0m\\n\")  # 'FAILED' in bold red\n     logger.error(e.response.reason + \"\\n\")\n     logger.error(e.response.text + \"\\n\")\n+    logger.error(f\"x-request-id: {e.response.headers.get('x-request-id')}\")\n+\n     if messages:\n         [logger.error(m) for m in messages]\n", "issue": "Feat(curation notebooks): display the x-request-id in the error response\nWhen an error occurs especially 500 errors, the only piece of debug information the user has is the x-request-id. Making this value visible to the users will help developer trouble shoot errors seen by the users in the future.\n", "before_files": [{"content": "import logging\nimport os\nimport sys\n\n\ndef set_log_level(log_level: str):\n    \"\"\"\n    :param log_level: the logging level (\"NOTSET\", \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\", \"FATAL\")\n    \"\"\"\n    all_levels = logging._nameToLevel.keys()\n    if log_level not in all_levels:\n        raise Exception(f\"The log_level arg must be one of {list(all_levels)}\")\n    os.environ[\"LOG_LEVEL\"] = log_level\n    logger = logging.getLogger()\n    logger.setLevel(log_level)\n    for h in logger.handlers:\n        h.setLevel(log_level)\n    print(f\"Set logging level to {log_level}\")\n\n\ndef get_custom_logger() -> logging.Logger:\n    \"\"\"\n    Get a custom logger that will still print to stdout in notebooks.\n    :return: the logger object\n    \"\"\"\n    log_level = os.getenv(\"LOG_LEVEL\", \"INFO\")\n    logging.basicConfig(level=log_level)\n    logger = logging.getLogger()\n    logger.removeHandler(logger.handlers[0])\n    ch = logging.StreamHandler(stream=sys.stdout)\n    ch.setLevel(level=log_level)\n    level_printout = f\"{'%(levelname)s:' if logger.level in ('WARN', 'ERROR') else ''}\"\n    formatter = logging.Formatter(f\"{level_printout}%(message)s\")\n    ch.setFormatter(formatter)\n    logger.addHandler(ch)\n    return logger\n\n\ndef failure(logger: logging.Logger, e, *messages):\n    logger.error(\"\\n\\033[1m\\033[38;5;9mFAILED\\033[0m\\n\")  # 'FAILED' in bold red\n    logger.error(e.response.reason + \"\\n\")\n    logger.error(e.response.text + \"\\n\")\n    if messages:\n        [logger.error(m) for m in messages]\n\n\ndef success(logger: logging.Logger, *messages):\n    logger.info(\"\\n\\033[1m\\033[38;5;10mSUCCESS\\033[0m\\n\")  # 'SUCCESS' in bold green\n    if messages:\n        [logger.info(m) for m in messages]\n", "path": "notebooks/curation_api/python/src/utils/logger.py"}]}