<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def display_hierarchy(root_ad_unit, all_ad_units):
 """Display the ad units as a tree. Args: root_ad_unit: The root ad unit to begin from. all_ad_units: A list containing all ad units. """

  # Create a dict mapping the ids of parents to lists of their children.
  parent_id_to_children = collections.defaultdict(list)
  for ad_unit in all_ad_units:
    if 'parentId' in ad_unit:
      parent_id_to_children[ad_unit['parentId']].append(ad_unit)
  parent_id_to_children = dict(parent_id_to_children)

  display_hierarchy_helper(root_ad_unit, parent_id_to_children, 0)