code: def test_metrics_non_strict():
      metrics = Metrics(strict=False)
  
      metrics.add_intermediate(0.6)
      metrics.add_intermediate({"default": 0.7})
      metrics.add_intermediate({"default": 0.8, "accuracy": 0.9})
      metrics.add_intermediate([3, 4, 5])
      metrics.final = (3, 5)
      assert metrics.intermediates == [
          0.6,
          {"default": 0.7},
          {"default": 0.8, "accuracy": 0.9},
          [3, 4, 5],
      ]
      assert metrics.final == (3, 5)
  
imports: import pytest
  import nni
  from nni.nas.space import Metrics
label_desc: Use image node_id 2 for calling a global function with example usage: test_metrics_non_strict() without return types