'generator to obtain organization data.'

def get_organizations(self):

    legislature_name = 'South    Carolina    Legislature'
    lower_chamber_name = 'House'
    lower_seats = 124
    lower_title = 'Representative'
    upper_chamber_name = 'Senate'
    upper_seats = 46
    upper_title = 'Senator'
    legislature = Organization(name=legislature_name, classification='legislature')
    upper = Organization(upper_chamber_name, classification='upper', parent_id=legislature._id)
    lower = Organization(lower_chamber_name, classification='lower', parent_id=legislature._id)
    for n in range(1, (upper_seats + 1)):
        upper.add_post(label=str(n), role=upper_title, division_id='{}/sldu:{}'.format(self.division_id, n))
    for n in range(1, (lower_seats + 1)):
        lower.add_post(label=str(n), role=lower_title, division_id='{}/sldl:{}'.format(self.division_id, n))
    (yield legislature)
    (yield upper)
    (yield lower)
