<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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