<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_json(json):
 """Creates a Track from a JSON file. No preprocessing is done. Arguments: json: map with the keys: name (optional) and segments. Return: A track instance """

        segments = [Segment.from_json(s) for s in json['segments']]
        return Track(json['name'], segments).compute_metrics()