<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_username_from_user_id(session, user_id):
 """Look up a MAL username's user ID. :type session: :class:`myanimelist.session.Session` :param session: A valid MAL session. :type user_id: int :param user_id: The user ID for which we want to look up a username. :raises: :class:`.InvalidUserError` :rtype: str :return: The given user's username. """

    comments_page = session.session.get(u'http://myanimelist.net/comments.php?' + urllib.urlencode({'id': int(user_id)})).text
    comments_page = bs4.BeautifulSoup(comments_page)
    username_elt = comments_page.find('h1')
    if "'s Comments" not in username_elt.text:
      raise InvalidUserError(user_id, message="Invalid user ID given when looking up username")
    return username_elt.text.replace("'s Comments", "")