input: Write a python function to calculate the mean score for each type from a given DataFrame.
  assert calculate_mean_score(pd.DataFrame({'name': ['John', 'Robert', 'Sue', 'John', 'Jeff', 'Robert'], 'score': [66, 52, 80, 74, 85, 62], 'type': ['math', 'reading', 'math', 'math', 'math', 'reading']})).to_dict() == {'math': 75.66666666666667, 'reading': 57.0}
  assert calculate_mean_score(pd.DataFrame({'name': ['Alice', 'Bob', 'Charlie', 'Alice', 'Bob', 'Charlie'], 'score': [90, 80, 70, 60, 50, 40], 'type': ['math', 'math', 'math', 'reading', 'reading', 'reading']})).to_dict() == {'math': 80.0, 'reading': 50.0}
output: def calculate_mean_score(df):
      return df.groupby('type')['score'].mean()