input: Write a python function to recommend movies based on cosine similarity.
  assert 'The Shawshank Redemption' in recommend('The Godfather').values
  assert 'The Godfather Part II' in recommend('The Godfather').values
  assert 'Apocalypse Now' in recommend('The Godfather').values
output: from sklearn.metrics.pairwise import cosine_similarity
  from sklearn.feature_extraction.text import TfidfVectorizer
  import pandas as pd
  
  # Sample movie dataset
  movies = {
      'titles': [
          'The Godfather', 'The Godfather Part II', 'The Shawshank Redemption',
          'Apocalypse Now', 'Pulp Fiction', 'Schindler\'s List', 
          'Fight Club', 'Forrest Gump', 'Inception', 'Goodfellas'
      ],
      'descriptions': [
          'The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.',
          'The early life and career of Vito Corleone in 1920s New York is portrayed while his son, Michael, expands and tightens his grip on the family crime syndicate.',
          'Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.',
          'A Vietnam War veteran finds himself on a mission to assassinate a renegade special forces colonel who sees himself as a god.',
          'The lives of two mob hitmen, a boxer, a gangster and his wife, and a pair of diner bandits intertwine in four tales of violence and redemption.',
          'In German-occupied Poland during World War II, Oskar Schindler gradually becomes concerned for his Jewish workforce after witnessing their persecution by the Nazis.',
          'An insomniac office worker and a devil-may-care soap maker form an underground fight club that evolves into much more.',
          'The presidencies of Kennedy and Johnson, the events of Vietnam, Watergate, and other history unfold through the perspective of an Alabama man with an IQ of 75.',
          'A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a CEO.',
          'The story of Henry Hill and his life in the mob, covering his relationship with his wife Karen Hill and his mob partners Jimmy Conway and Tommy DeVito.'
      ]
  }
  
  # Create a DataFrame
  df = pd.DataFrame(movies)
  
  def recommend(movie_title):
      # Check if the movie is in the dataset
      if movie_title not in df['titles'].values:
          return {}
  
      # Initialize TF-IDF Vectorizer
      tfidf = TfidfVectorizer(stop_words='english')
  
      # Fit and transform the descriptions
      tfidf_matrix = tfidf.fit_transform(df['descriptions'])
  
      # Compute the cosine similarity matrix
      cosine_sim = cosine_similarity(tfidf_matrix, tfidf_matrix)
  
      # Get the index of the movie that matches the title
      idx = df.index[df['titles'] == movie_title].tolist()[0]
  
      # Get the pairwise similarity scores of all movies with the given movie
      sim_scores = list(enumerate(cosine_sim[idx]))
  
      # Sort the movies based on the similarity scores
      sim_scores = sorted(sim_scores, key=lambda x: x[1], reverse=True)
  
      # Get the scores of the 10 most similar movies
      sim_scores = sim_scores[1:11]
  
      # Get the movie indices
      movie_indices = [i[0] for i in sim_scores]
  
      # Return the top 10 most similar movies
      return df['titles'].iloc[movie_indices].to_dict()