from typing import List


def format_index_response(user_info: dict, user_posts: List[dict]) -> dict:
    """
    This function formats the response accordingly as the defined standard.
    :param user_info: dict -> general user info
    :param user_posts: List[dict] -> posts related to user
    :return: dict -> formatted dict response
    """
    response_dict = dict()

    response_dict['user'] = user_info

    # remove all userId's from the posts
    [post.pop('userId', None) for post in user_posts]

    response_dict['posts'] = user_posts

    return response_dict