code: def deep_equal(a, b):
      
      if is_any_string_type(a) and is_any_string_type(b):
          if isinstance(a, six.binary_type):
              a = six.text_type(a, encoding='utf-8')
          if isinstance(b, six.binary_type):
              b = six.text_type(b, encoding='utf-8')
          return a == b
      return a == b and isinstance(a, type(b)) and isinstance(b, type(a))
docs: Because of things in python like:
          >>> 1 == 1.0
          True
          >>> 1 == True
          True
          >>> b'test' == 'test'  # python3
          False