code: def get_customizations_for(
      language, algo, property=None, default=None
  ):
      lang_customizations = _gen_customizations[language]
      if algo not in lang_customizations:
          custom_file = os.path.join(
              os.path.dirname(__file__),
              "custom",
              language,
              "gen_{}.py".format(algo.lower()),
          )
          customizations = dict()
          if os.path.isfile(custom_file):
              with open(custom_file) as f:
                  # linecache and compile are necessary only if we want to inspect code later
                  # otherwise the following statement is enough:
                  # exec(f.read(), customizations)
                  linecache.updatecache(f.name)
                  code = compile(f.read(), f.name, "exec")
                  exec(code, customizations)
          lang_customizations.update({algo: customizations})
  
      customizations = lang_customizations[algo]
      if property:
          tokens = property.split(".")
          value = customizations
          for token in tokens:
              value = value.get(token)
              if value is None:
                  return default
          return value
      else:
          return customizations
  
imports: from collections import defaultdict
  import linecache
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: get_customizations_for(language, algo, property, default) and returns: value, customizations, default