code: def merge_lists(base, overrides, attr):
      # Merge two lists of classes by comparing them for equality using 'attr'.
      # This function prefers anything in 'overrides'. In other words, if a class
      # is present in overrides and matches (according to the equality criterion) a class in
      # base, it will be used instead of the one in base.
      l = list(overrides)
      existing = set([getattr(o, attr) for o in overrides])
      l.extend([d for d in base if getattr(d, attr) not in existing])
      base[:] = l[:]
  
file_path: metaflow/metaflow/extension_support/plugins.py
imports: import importlib
  import traceback
  from metaflow.metaflow_config_funcs import from_conf
  from .None import _ext_debug, alias_submodules, get_modules, lazy_load_aliases
label_desc: Use image node_id 2 for calling a global function with example usage: merge_lists(base, overrides, attr) without return types