def update_summaries(scenario):
        """Update the object summary and number summary of one scenario in-place.

        Args:
            scenario: The input scenario

        Returns:
            The same scenario with the scenario['metadata']['object/number_summary'] be overwritten.
        """
        SD = ScenarioDescription

        # add agents summary
        summary_dict = {}
        for track_id, track in scenario[SD.TRACKS].items():
            summary_dict[track_id] = SD.get_object_summary(object_dict=track, object_id=track_id)
        scenario[SD.METADATA][SD.SUMMARY.OBJECT_SUMMARY] = summary_dict

        # count some objects occurrence
        scenario[SD.METADATA][SD.SUMMARY.NUMBER_SUMMARY] = SD.get_number_summary(scenario)
        return scenario
Update the object summary and number summary of one scenario in-place.

        Args:
            scenario: The input scenario

        Returns:
            The same scenario with the scenario['metadata']['object/number_summary'] be overwritten.
        
metadrive/scenario/scenario_description.py