code: def extend_range(
      lower: float,
      upper: float,
      percent: int = 10,
      log_scale: bool = False,
  ) -> Tuple[float, float]:
      """Given a range of minimum and maximum values taken by values on a given axis,
      extend it in both directions by a given percentage to have some margin within
      the plot around its meaningful part.
      """
      if upper <= lower:
          raise ValueError(
              f"`upper` should be greater than `lower`, got: {upper} (<= {lower})."
          )
  
      if log_scale:
          raise NotImplementedError("Log scale not yet supported.")
  
      margin = (upper - lower) * percent / 100
  
      return lower - margin, upper + margin
  
imports: import math
  from collections import Counter
  from logging import Logger
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
  import numpy
  from ax.core.generator_run import GeneratorRun
  from ax.core.observation import Observation, ObservationFeatures
  from ax.core.parameter import ChoiceParameter, FixedParameter, Parameter, ParameterType, RangeParameter
  from ax.core.types import TParameterization
  from ax.modelbridge.base import ModelBridge
  from ax.modelbridge.prediction_utils import _compute_scalarized_outcome, predict_at_point
  from ax.modelbridge.transforms.ivw import IVW
  from ax.plot.base import DECIMALS, PlotData, PlotInSampleArm, PlotOutOfSampleArm, Z
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 1 for calling a global function with example usage: extend_range(lower, upper, percent, log_scale) and returns: unknown,  unknown