Populate dict of units by code iff UNITS_BY_CODE is empty.

def _lazy_load_units_by_code():
  """Populate dict of units by code iff UNITS_BY_CODE is empty."""
  if UNITS_BY_CODE:
    # already populated
    return

  for unit in units.UNITS_BY_NAME.values():
    UNITS_BY_CODE[unit.code] = unit