code: def is_improvement(
      best_value: float,
      current_value: float,
      larger_is_better: bool,
      relative_delta: float = 0.0,
  ) -> bool:
      """
      Decide whether the current value is an improvement over the best value.
  
      :param best_value:
          The best value so far.
      :param current_value:
          The current value.
      :param larger_is_better:
          Whether a larger value is better.
      :param relative_delta:
          A minimum relative improvement until it is considered as an improvement.
  
      :return:
          Whether the current value is better.
      """
      better = (
          current_value > best_value
          if larger_is_better
          else current_value < best_value
      )
      return better and not math.isclose(
          current_value, best_value, rel_tol=relative_delta
      )
  
imports: import dataclasses
  import logging
  import math
  import pathlib
  from dataclasses import dataclass
  from typing import Any, Callable, List, Mapping, Optional, Union
  from uuid import uuid4
  import torch
  from .stopper import Stopper
  from ..constants import PYKEEN_CHECKPOINTS
  from ..evaluation import Evaluator
  from ..models import Model
  from ..trackers import ResultTracker
  from ..triples import CoreTriplesFactory
  from ..utils import fix_dataclass_init_docs
label_desc: Use image node_id 1 for calling a global function with example usage: is_improvement(best_value, current_value, larger_is_better, relative_delta) and returns: unknown