def _recursive_compare(v1, v2):
 if isinstance(v1, list):
  if (len(v1) != len(v2)):
   return False
  v1.sort()
  v2.sort()
  for (x, y) in zip(v1, v2):
   if (not _recursive_compare(x, y)):
    return False
  return True
 elif isinstance(v1, dict):
  v1 = dict(v1)
  v2 = dict(v2)
  if (sorted(v1) != sorted(v2)):
   return False
  for k in v1:
   if (not _recursive_compare(v1[k], v2[k])):
    return False
  return True
 else:
  return (v1 == v2)

def _recursive_compare ( v1 , v2 ) : if isinstance ( v1 , list ) : if ( len ( v1 ) != len ( v2 ) ) : return False v1 . sort ( ) v2 . sort ( ) for ( x , y ) in zip ( v1 , v2 ) : if ( not _recursive_compare ( x , y ) ) : return False return True elif isinstance ( v1 , dict ) : v1 = dict ( v1 ) v2 = dict ( v2 ) if ( sorted ( v1 ) != sorted ( v2 ) ) : return False for k in v1 : if ( not _recursive_compare ( v1 [ k ] , v2 [ k ] ) ) : return False return True else : return ( v1 == v2 )
return v1 == v2 .