def get_course_content(database, branch_ids):
    """Get course content for each branch id."""
    content = {}

    for branch_id in branch_ids:
        collection = 'modulestore.structures'
        query = {"_id": branch_id}
        cursor = database[collection].find(query)

        for result in cursor:
            content[branch_id] = result

    return content