code: def iter_units_for_relation_name(relation_name):
      
      RelatedUnit = namedtuple('RelatedUnit', 'rid, unit')
      for rid in relation_ids(relation_name):
          for unit in related_units(rid):
              yield RelatedUnit(rid, unit)
docs: Iterate through all units in a relation
  
      Generator that iterates through all the units in a relation and yields
      a named tuple with rid and unit field names.
  
      Usage:
      data = [(u.rid, u.unit)
              for u in iter_units_for_relation_name(relation_name)]
  
      :param relation_name: string relation name
      :yield: Named Tuple with rid and unit field names