code: def clean_xgboost_objective(objective):
      """
      Translate objective to be compatible with loaded xgboost version
  
      Args
      ----
  
      objective : string
          The objective to translate.
  
      Returns
      -------
      The translated objective, or original if no translation was required.
      """
      compat_before_v83 = {"reg:squarederror": "reg:linear"}
      compat_v83_or_later = {"reg:linear": "reg:squarederror"}
      if version.parse(xgboost_version) < version.parse("0.83"):
          if objective in compat_before_v83:
              objective = compat_before_v83[objective]
      else:
          if objective in compat_v83_or_later:
              objective = compat_v83_or_later[objective]
      return objective
  
file_path: causalml/causalml/inference/meta/utils.py
imports: import pandas
  import numpy
  from packaging import version
  from xgboost import __version__
label_desc: Use image node_id 5 for calling a global function with example usage: clean_xgboost_objective(objective) and returns: objective