def equals(self, rhs):
    """Check whether the given key/value pair is in the rhs dict.

    Returns:
      bool
    """

    try:
      return rhs[self._key] == self._value
    except Exception:
      return False
Check whether the given key/value pair is in the rhs dict.

    Returns:
      bool
    
deps/protobuf/python/mox.py