human
I wrote the below code

    def _MakePhotoDict(post, photo, user_post, user_photo):
        ph_dict = photo.MakeMetadataDict(post, user_post, user_photo)
        if (not post.IsRemoved()):
            ph_dict['full_get_url'] = photo_store.GeneratePhotoUrl(obj_store, ph_dict['photo_id'], '.f')
        return ph_dict
    episode_keys = [db_client.DBKey(ep_id, None) for ep_id in episode_ids]
    post_tasks = []
    for ep_id in episode_ids:
        post_tasks.append(gen.Task(Post.RangeQuery, client, ep_id, None, None, None, excl_start_key=None))
    (episodes, posts_list) = (yield [gen.Task(Episode.BatchQuery, client, episode_keys, None, must_exist=False), gen.Multi(post_tasks)])
    viewpoint_keys = [db_client.DBKey(viewpoint_id, None) for viewpoint_id in set((ep.viewpoint_id for ep in episodes if (ep is not None)))]
    follower_keys = [db_client.DBKey(user_id, db_key.hash_key) for db_key in viewpoint_keys]
    all_posts = [post for posts in posts_list if (posts is not None) for post in posts]
    photo_keys = [db_client.DBKey(post.photo_id, None) for post in all_posts]
    user_post_keys = [db_client.DBKey(user_id, Post.ConstructPostId(post.episode_id, post.photo_id)) for post in all_posts]
    if user_id:
        user_photo_task = gen.Task(UserPhoto.BatchQuery, client, [db_client.DBKey(user_id, post.photo_id) for post in all_posts], None, must_exist=False)
    else:
        user_photo_task = util.GenConstant(None)
    (viewpoints, followers, photos, user_posts, user_photos) = (yield [gen.Task(Viewpoint.BatchQuery, client, viewpoint_keys, None, must_exist=False), gen.Task(Follower.BatchQuery, client, follower_keys, None, must_exist=False), gen.Task(Photo.BatchQuery, client, photo_keys, None), gen.Task(UserPost.BatchQuery, client, user_post_keys, None, must_exist=False), user_photo_task])
    viewable_viewpoint_ids = set((viewpoint.viewpoint_id for (viewpoint, follower) in zip(viewpoints, followers) if _CanViewViewpointContent(viewpoint, follower)))
    response_dict = {'episodes': []}
    for (ep_id, episode, posts) in...

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

@gen.coroutine
def _QueryEpisodesForArchive(client, obj_store, user_id, episode_ids):