Task: Implement a small rating calculator with a type alias.
What to implement
Create a module Types.py that defines a type alias:
DataType = Dict[str, List[Tuple[str, float]]]
This represents, for each student name (str), a list of (subject, score) pairs where score is a float.
Create a module CalcRating.py that provides:
A class CalcRating with:
init(self, data: DataType) that stores the input data exactly as self.data (no modification).
calc(self) -> Dict[str, float] that computes, for each student, the arithmetic mean of all their subject scores.
If a student has no subjects, the average should be 0.0.
Returns a dictionary mapping student name to their average score (float).
Type hints should be used and CalcRating should import DataType from Types.
How this relates to the tests
test_init_calc_rating expects an instance of CalcRating to expose the input data as the attribute data, i.e., calc_rating.data == input_data[0].
test_calc expects calc() to return a dict of per-student averages matching the provided ratings (e.g., averaging 80, 76, 100 yields 85.3333 for the first student, and averaging 61, 80, 78, 97 yields 79.0 for the second).
Notes
The implementation must not mutate the input data.
Use standard Python typing and built-ins only.
A simple, self-contained solution (no external dependencies) is acceptable.