docstr: `flatten` orders dicts by key, including OrderedDicts.
docstr_tok: ["`","flatten","`","orders","dicts","by","key",",","including","OrderedDicts","."]
code: def testFlattenDictOrder(self):
      """`flatten` orders dicts by key, including OrderedDicts."""
      ordered = collections.OrderedDict(
          [("d", 3), ("b", 1), ("a", 0), ("c", 2)]
      )
      plain = {"d": 3, "b": 1, "a": 0, "c": 2}
      ordered_flat = nest.flatten(ordered)
      plain_flat = nest.flatten(plain)
      self.assertEqual([0, 1, 2, 3], ordered_flat)
      self.assertEqual([0, 1, 2, 3], plain_flat)
  
imports: import collections
  import dataclasses
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.data.kernel_tests import test_base
  from tensorflow.python.data.util import nest
  from tensorflow.python.framework import combinations
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 8 for calling the NestTest obj's underlying member method code with example usage: obj.testFlattenDictOrder() without return types