"""Add or update a movie
Adds strings to the movie_dict for a new movie name.If movie name is not in movie_dict, add a new entry.
If the movie_name is already in movie_dict, append theactors to the existing actors. There should be norepeat actor names.
Args: movie_dict: A movie dictionary. movie_name: A string representing the unique name of a movie. actors: A list of strings representing the actors in that movie.
Returns the movie_dict."""def add_or_update_a_movie(movies, movie_name, actors): if movie_name not in movies: movies[movie_name] = list(set(actors)) else: movies[movie_name] = list(set(movies[movie_name].extend(actors)))
"""Removes an actor from movie_name in a movie_dict object.
Args: movie_dict: A movie dictionary. movie_name: A string representing the unique name of a movie. actors: A list of strings representing the actors in that movie.
Returns the movie_dict."""def remove_actor_from_movie(movie_dict, movie_name, actor): pass
"""Given a movie dictionary, returns the movie with the most actors.In the case of a tie, any single movie is acceptable.
Args: movie_dict: A movie dictionary.
Returns a string."""def find_movie_with_most_actors(movie_dict): pass
"""Given two actors, returns an array of movie names in which bothactors appear.
Args: actor_1: {str} Name of first actor. actor_2: {str} Name of second actor.
Returns an array of strings."""def find_similar_movies(movie_dict, actor1, actor2): pass
"""Given a movie dictionary, returns the actor which has been inthe most movies.
Args: movie_dict: A movie dictionary.
Returns a string."""def find_actor_with_most_movies(movie_dict): pass
"""Opens a file named movie_filename. Each line in thisfile is formatted as follows:
movie_1,actor_a,actor_b,actor_c,.....movie_2,actor_d,actor_e,actor_amovie_3,actor_e,.......
This function returns a movie dictionary with thecorrect mappings from the given file."""def parse_movie_text_file(movie_filename): pass
"""Degrees between is a function thatattempts to find how many movies apart a given actor 1is to actor 2. If they have been in a movie withactor 1, they are 1 degree from actor 1. Ifthe actor has been in a movie with an actor who hasbeen in a movie with actor 1, then they are 2degrees away from actor 1, and so on.
Write a function which when given two actors, returnsthe number of degrees between actor1 and actor2.
Args: actor_1: {str} Name of first actor. actor_2: {str} Name of second actor.
Returns an integer."""def degrees_between(actor1, actor2): pass