Define a dataclass Location that has two fields: city (str) and state (str).
Define a dataclass Trip that has three fields: origin (Location), target (Location), and duration (int). The duration field represents how long the Trip takes in minutes, while the origin and target are the beginning and ending locations of the Trip.
Then, define a function combine_trips that consumes two Trip instances and produces one new Trip. The new trip will have the origin of the first Trip parameter and the target of the second Trip parameter. Its duration will be the sum of the two Trip parameter’s durations.