code: def test_dict_sketch_int_value(self):
      dict_data = [
          {},
          {"a": 1, "b": 2},
          {"a": 1, "b": 2},
          {"a": 3, "c": 1},
          {"a": 1, "b": 2, "c": 3},
          None,
      ]
      sa = SArray(data=dict_data)
      self.__validate_nested_sketch_result(sa)
  
      sketch = sa.summary()
      self.assertEqual(sketch.num_unique(), 4)
      fi = sketch.frequent_items()
      self.assertEqual(len(fi), 4)
  
      # The order in which keys are reported is different in python2 vs python3.
      # So when the dictionary is converted to a string, it results in different
      # strings. Try both possible combinations for dictionary.
      v = (
          fi['{"a":1, "b":2}']
          if '{"a":1, "b":2}' in fi
          else fi['{"b":2, "a":1}']
      )
      self.assertEqual(v, 2)
      v = (
          fi['{"a":3, "c":1}']
          if '{"a":3, "c":1}' in fi
          else fi['{"c":1, "a":3}']
      )
      self.assertEqual(v, 1)
  
      # Get dict key sketch
      key_summary = sketch.dict_key_summary()
      another_rep = list(
          itertools.chain.from_iterable(list(sa.dict_keys().dropna()))
      )
      self.__validate_sketch_result(key_summary, SArray(another_rep))
  
      # Get dict value sketch
      value_summary = sketch.dict_value_summary()
      another_rep = list(
          itertools.chain.from_iterable(list(sa.dict_values().dropna()))
      )
      self.__validate_sketch_result(value_summary, SArray(another_rep))
  
      # sub sketch with one key
      s = sa.summary(sub_sketch_keys="a").element_sub_sketch("a")
      expected = sa.unpack(column_name_prefix="")["a"]
      self.__validate_sketch_result(s, expected)
  
      s = sa.summary(sub_sketch_keys="Nonexist").element_sub_sketch(
          "Nonexist"
      )
      self.assertEqual(s.num_missing(), len(sa))
  
      # sub sketch with multiple keys
      keys = ["a", "b"]
      s = sa.summary(sub_sketch_keys=keys).element_sub_sketch(keys)
      self.assertEqual(len(s), len(keys))
      for key in keys:
          self.assertTrue(key in s)
          expected = sa.unpack(column_name_prefix="")[key]
          self.__validate_sketch_result(s[key], expected)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ..data_structures.sarray import SArray
  import pandas
  import numpy
  import unittest
  import random
  import copy
  import os
  import math
  import array
  import time
  import itertools
  import pytest
label_desc: Use image node_id 7 for calling the SArraySketchTest obj's underlying member method code with example usage: obj.test_dict_sketch_int_value() without return types