code: def select_ref_or_regular(regular, ref):
      return regular if ref is None else ref
  
imports: import torch
  from ..losses import BaseMetricLossFunction, CrossBatchMemory
  from ..miners import BaseMiner
  from ..utils import common_functions
  from ..utils import loss_and_miner_utils
label_desc: Use image node_id 8 for calling a global function with example usage: select_ref_or_regular(regular, ref) and returns: unknown