def title_data(movie_row, movie_map):
    """Given a list representing a row from a text file and a dictionary,
    returns an updated version of input dictionary.

    Parameters:
        movie_data: a list representing a row from a text file.
        movie_map: a dictionary that is either empty or maps movieIDs
        to other movie metadata.

    Returns:
        movie_map: a nested dictionary mapping movieIDs to IMBD rating,
        release year, and genre(s) (and other movie metadata if already in
        input dictionary).
    """

    # Cleans movieID data points
    movie_id = movie_row[0].replace(' ', '')

    # If movieID not in dictionary, creates new mapping from movieID to empty
    # dictionary
    if movie_id not in movie_map:
        movie_map[movie_id] = {}

    # Cleans data, converts release year to an interger, then maps movieID to
    # release year
    release_year = movie_row[2].replace('/I', '')
    release_year = release_year.replace(' ', '')
    release_year_int = int(release_year)
    movie_map[movie_id]['release_year'] = release_year_int

    # Cleans data, converts IMBD rating to a floar, then maps movieID to IMBD
    # rating
    imbd_rating = movie_row[3].replace(' ', '')
    imbd_rating_float = float(imbd_rating)
    movie_map[movie_id]['imbd_rating'] = imbd_rating_float

    # Cleans data, converts genre(s) to a list of strings, then maps movieID to
    # genre(s)
    genre = movie_row[5].replace('\n', ' ')
    replace_list = ['[', ']', '\'', ' ']
    for item in replace_list:
        genre = genre.replace(item, '')
    genre_list = genre.split(',')
    movie_map[movie_id]['genre'] = genre_list

    return movie_map