code: def do_not_set_existing_value_to_null(
      instance: SQABase,
      new_value: T,
      old_value: T,
      initiator_event: event.Events,
  ) -> T:
      no_value = [None, NO_VALUE]
      if new_value in no_value and old_value not in no_value:
          logger.debug(
              f"New value for attribute is `None` or has no value, but old value "
              f"was set, so keeping the old value ({old_value})."
          )
          return old_value
      return new_value
  
file_path: Ax/ax/storage/sqa_store/validation.py
imports: from logging import Logger
  from typing import Any, Callable, List, TypeVar
  from ax.storage.sqa_store.db import SQABase
  from ax.storage.sqa_store.reduced_state import GR_LARGE_MODEL_ATTRS
  from ax.storage.sqa_store.sqa_classes import ONLY_ONE_FIELDS, ONLY_ONE_METRIC_FIELDS, SQAMetric, SQAParameter, SQAParameterConstraint, SQARunner
  from ax.utils.common.logger import get_logger
  from sqlalchemy import event
  from sqlalchemy.engine import Connection
  from sqlalchemy.orm.attributes import InstrumentedAttribute
  from sqlalchemy.orm.base import NO_VALUE
  from sqlalchemy.orm.mapper import Mapper
label_desc: Use image node_id 3 for calling a global function with example usage: do_not_set_existing_value_to_null(instance, new_value, old_value, initiator_event) and returns: new_value, old_value