def resolveDefaults( defaults, subNames = [], **kwargs ):
   # First duplicate the given defaults
   subDefaults = {}
   subDefaults.update( defaults )

   # Next add in any keyword arguments
   for key in kwargs:
      value = kwargs[ key ]

      # If the kw value is not set, then ignore
      if value is None:
         continue

      # We have a kw value and nothing has been set yet.
      if isinstance( value, SubStyle ):
         value = value.kwargs()

      if isinstance( value, dict ) and ( key in subDefaults ):
         other = subDefaults[ key ]
         if isinstance( other, SubStyle ):
            other = other.kwargs()

         value = mergeDicts( other, value )

      # Store the value
      subDefaults[ key ] = value

   for name in subNames:
      if name in defaults:
         tmp = defaults[ name ]

         if tmp is None:
            continue

         if isinstance( tmp, SubStyle ):
            tmp = tmp.kwargs()

         if isinstance( tmp, dict ):
            subDefaults = mergeDicts( subDefaults, tmp )
         else:
            subDefaults[ name ] = tmp

   return subDefaults

#===========================================================================
If there are fewer than three elements, C{fromString} should raise
dataset/ETHPy150Open nasa/mplStyle/mplStyle/types/lib.py/resolveDefaults--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/test/test_knownhosts.py/ParseErrorTests.invalidEntryTest