code: def dict_equal_primitive(this, that):
      """Compare two dictionaries but consider only primitive values"""
      if not this.keys() == that.keys():
          return False
  
      equal_fields = []
      for k, v in this.items():
          if isinstance(v, (int, float, bool, str)):
              equal_fields.append(v == that[k])
          if isinstance(v, dict):
              equal_fields.append(dict_equal_primitive(v, that[k]))
          if isinstance(v, list):
              equal_fields.append(
                  dict_equal_primitive(
                      dict(enumerate(v)), dict(enumerate(that[k]))
                  )
              )
  
      return all(equal_fields)
  
file_path: autogluon/timeseries/tests/unittests/common.py
imports: import random
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from gluonts.dataset.common import ListDataset
  from autogluon.timeseries.dataset import TimeSeriesDataFrame
  from autogluon.timeseries.dataset.ts_dataframe import ITEMID, TIMESTAMP
  from autogluon.timeseries.metrics import TimeSeriesScorer
label_desc: Use image node_id 4 for calling a global function with example usage: dict_equal_primitive(this, that) and returns: all, False