def _validate_mutable_mappings(a, b):
 if (not (isinstance(a, MutableMapping) and isinstance(b, MutableMapping))):
  myvars = []
  for x in [a, b]:
   try:
    myvars.append(dumps(x))
   except:
    myvars.append(to_native(x))
  raise AnsibleError("failed to combine variables, expected dicts but got a '{0}' and a '{1}': \n{2}\n{3}".format(a.__class__.__name__, b.__class__.__name__, myvars[0], myvars[1]))

def _validate_mutable_mappings ( a , b ) : if ( not ( isinstance ( a , MutableMapping ) and isinstance ( b , MutableMapping ) ) ) : myvars = [ ] for x in [ a , b ] : try : myvars . append ( dumps ( x ) ) except : myvars . append ( to_native ( x ) ) raise AnsibleError ( "failed to combine variables, expected dicts but got a '{0}' and a '{1}': \n{2}\n{3}" . format ( a . __class__ . __name__ , b . __class__ . __name__ , myvars [ 0 ] , myvars [ 1 ] ) )
internal convenience function to ensure arguments are mutablemappings this checks that all arguments are mutablemappings or raises an error :raises ansibleerror: if one of the arguments is not a mutablemapping .