code: def _equal(a, b, identityLong, relicCompare):
      
      # Check for an identity comparison.
      if isinstance(b, (long, int)) and b == identityLong:
          return a.isIdentity()
  
      # Verify type and fix normalization for a valid comparison.
      assertSameType(a, b)
      a.normalize()
      b.normalize()
  
      # Compare the elements using the relic function.
      return relicCompare(byref(a), byref(b)) == EQUAL
docs: Compares element @a to @b. If @b is @identityLong, returns 
      a.isIdentity(). Otherwise, normalize a and b and use the relicCompare
      function to test for equality.