code: def _lazy_load_units_by_code():
    
    if UNITS_BY_CODE:
      # already populated
      return
  
    for unit in units.UNITS_BY_NAME.values():
      UNITS_BY_CODE[unit.code] = unit
docs: Populate dict of units by code iff UNITS_BY_CODE is empty.