def _BuildConfig(self, additional_config_str=''):
    """Builds a metrics config."""
    config = motion_metrics_pb2.MotionMetricsConfig()
    config_text = """
    track_steps_per_second: 10
    prediction_steps_per_second: 10
    track_history_samples: 0
    track_future_samples: 4
    step_configurations {
      measurement_step: 3
      lateral_miss_threshold: 1.0
      longitudinal_miss_threshold: 2.0
    }
    max_predictions: 6
    speed_scale_lower: 1.0
    speed_scale_upper: 1.0
    speed_lower_bound: 1.4
    speed_upper_bound: 11.0
    """ + additional_config_str
    text_format.Parse(config_text, config)
    return config